View previous topic :: View next topic |
Author |
Message |
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Sat Nov 25, 2006 18:19 Post subject: Accent problem |
|
|
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 |
|
|
yi
Joined: 17 May 2005 Posts: 12 Location: France
|
|
Back to top |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Mon Nov 27, 2006 16:57 Post subject: |
|
|
Any clue to fix the bug, papillon ? |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Mon Nov 27, 2006 17:08 Post subject: |
|
|
I haven't looked into that, yet. _________________ Papillon |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Tue Nov 28, 2006 23:08 Post subject: |
|
|
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
Maybe it's an issue with the NWN function ? _________________ Papillon |
|
Back to top |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Thu Nov 30, 2006 1:00 Post subject: |
|
|
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 |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Thu Nov 30, 2006 2:40 Post subject: |
|
|
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 |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Thu Nov 30, 2006 10:25 Post subject: |
|
|
Or there is some character conversion going on silently... but I wouldn't know where to look, currently. _________________ Papillon |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Thu Nov 30, 2006 12:11 Post subject: |
|
|
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 |
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 |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Thu Nov 30, 2006 12:16 Post subject: |
|
|
i use Latin1 character set
this evening i will make some test with different MySQL character set |
|
Back to top |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Thu Nov 30, 2006 21:33 Post subject: |
|
|
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 |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Fri Dec 01, 2006 10:07 Post subject: |
|
|
I'll conduct some more tests on the weekend. _________________ Papillon |
|
Back to top |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Fri Dec 22, 2006 14:07 Post subject: |
|
|
Hi,
Any new idea about this problem ? |
|
Back to top |
|
|
xaltos
Joined: 03 Jun 2006 Posts: 31 Location: Germany
|
Posted: Fri Dec 22, 2006 17:39 Post subject: |
|
|
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 |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Fri Dec 22, 2006 21:48 Post subject: |
|
|
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 |
|
|
|