logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Accent problem
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
amphiprion



Joined: 07 Nov 2006
Posts: 44
Location: Toulouse (France)

PostPosted: Sat Nov 25, 2006 18:19    Post subject: Accent problem Reply with quote

Hi papillon,

there is a trouble to exchange accent (i.e. é, č, ô ...) between NWN and Database (or simply NWN and NWNX)

If i do SetCustomToken(100, "télévision"); and in a conversation <CUSTOM100> it work fine

but if i have in a mysql field the same text (télévision), then
SetCustomToken(100, SQLGetData(1));

in the dialog i will have square characters (t□l□vision)

It's not a mysql problem, because i can see correctly data with a database client (character set, West european)
Back to top
View user's profile Send private message
yi



Joined: 17 May 2005
Posts: 12
Location: France

PostPosted: Sun Nov 26, 2006 10:06    Post subject: Reply with quote

I do have the same issue
_________________
http://www.arkalym.com
Back to top
View user's profile Send private message
amphiprion



Joined: 07 Nov 2006
Posts: 44
Location: Toulouse (France)

PostPosted: Mon Nov 27, 2006 16:57    Post subject: Reply with quote

Any clue to fix the bug, papillon ?
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Mon Nov 27, 2006 17:08    Post subject: Reply with quote

I haven't looked into that, yet.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Tue Nov 28, 2006 23:08    Post subject: Reply with quote

Could you please try to write the data to the log file ? This is what I got in my test:

Quote:
[Tue Nov 28 22:05:02] First row column 1: abc2 café is nice


The café came back hot and instantly Smile

Maybe it's an issue with the NWN function ?
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
amphiprion



Joined: 07 Nov 2006
Posts: 44
Location: Toulouse (France)

PostPosted: Thu Nov 30, 2006 1:00    Post subject: Reply with quote

Exact, if i trace the SQLGetData in the log file it work fine

so :

1) SetCustomToken(100, "télévision"); work fine
2) WriteTimestampToLog(SQLGetData(1)); work fine (in mysql field 1 there is "télévision")
3) SetCustomToken(100, SQLGetData(1)); BUG

if someone have an idea to avoid this problem Wink
Back to top
View user's profile Send private message
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Thu Nov 30, 2006 2:40    Post subject: Reply with quote

It sounds like the problem may be with the game itself, in that perhaps it can't display that character?
_________________
Khalidine, a NWN2 persistent world

Looking for volunteers.
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Thu Nov 30, 2006 10:25    Post subject: Reply with quote

Or there is some character conversion going on silently... but I wouldn't know where to look, currently.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Thu Nov 30, 2006 12:11    Post subject: Reply with quote

amphiprion wrote:
Exact, if i trace the SQLGetData in the log file it work fine

so :

1) SetCustomToken(100, "télévision"); work fine
2) WriteTimestampToLog(SQLGetData(1)); work fine (in mysql field 1 there is "télévision")
3) SetCustomToken(100, SQLGetData(1)); BUG

if someone have an idea to avoid this problem Wink


Which character-set are you using in your database?
This is possibly where you're getting the error.

The two NWN2 fonts (NWN2_Main & NWN2_Title) only fully define the "Basic Latin" & "Latin-1" (0-127, 128-255) if you'e using a character-set that doesn't map these to the NWN2 fonts - you'll get errors.

If in doubt, install the NWN2 fonts into your Fonts folder - and use them in a Word Doc (or similar)

Cheers
Gryphyn
Back to top
View user's profile Send private message
amphiprion



Joined: 07 Nov 2006
Posts: 44
Location: Toulouse (France)

PostPosted: Thu Nov 30, 2006 12:16    Post subject: Reply with quote

i use Latin1 character set

this evening i will make some test with different MySQL character set
Back to top
View user's profile Send private message
amphiprion



Joined: 07 Nov 2006
Posts: 44
Location: Toulouse (France)

PostPosted: Thu Nov 30, 2006 21:33    Post subject: Reply with quote

So, i have made many test with different character set (Latin1, Latin2,...Latin7, UTF8, and many others)
but none can display correcly the accent character in nwn2
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Fri Dec 01, 2006 10:07    Post subject: Reply with quote

I'll conduct some more tests on the weekend.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
amphiprion



Joined: 07 Nov 2006
Posts: 44
Location: Toulouse (France)

PostPosted: Fri Dec 22, 2006 14:07    Post subject: Reply with quote

Hi,

Any new idea about this problem ?
Back to top
View user's profile Send private message
xaltos



Joined: 03 Jun 2006
Posts: 31
Location: Germany

PostPosted: Fri Dec 22, 2006 17:39    Post subject: Reply with quote

I think this is a Unicode / ASCII code problem

The scripts are stored in Unicode !
So your ęčé are coded with two or more bytes.

Some of the functions do an automatically convert for the strings.
e.g. if you call a Standard Windows DLL from a .Net program will it convert all the Unicode character in normal ASCII character.

You can do an easy test , to confirm this theory.

do a
WriteTimestampToLog(SQLGetData(1));
and a
WriteTimestampToLog("télévision");

and open the log file with an Hex editor.

I think you will see that the first entry is a ASCII and the second one a Unicode text.
_________________
xaltos

NWN2_Audolo
Back to top
View user's profile Send private message
amphiprion



Joined: 07 Nov 2006
Posts: 44
Location: Toulouse (France)

PostPosted: Fri Dec 22, 2006 21:48    Post subject: Reply with quote

i've already do this test, and the accents appear correctly in the log file (méthod 1 znd 2), but not at screen (SendMessageToPC, ...)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development All times are GMT + 2 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group