Good morning...
I have an SQLite database that has some french accented characters in it... When these are pulled into a datagrid in the stack they get replaced with different symbols. Could someone point out to me how to bring them into the datagrid so that they display properly.
Eventually the stack will be running under Windows even though I'm building it on the Mac platform...
Any help would be appreciated... be well
Dixie
MacBook Pro
Mac OS 10.6.3
Help with accented charecters...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Help with accented charecters...
Hi Dixie,
this is one of the biggest crossplatform problems!
I would stick to ONE character encoding scheme and only use this one on all platforms!
In the past I used the windows iso encoding, so I could use the "mactoiso" and "isotomac" functions
to get and set the text into/out of the database.
I used these little selfmade functions while working:
This way I could use:
...
put mac2win(field XYZ) into tVaribale
## write tVaraiable to database
...
## get tect from database
put win2mac(tVariable) into fld xyz
...
You get the picture.
But this might unfortunately not cover ALL accents/special characters!
If you have problems here, you might need to use UNICODE somehow for all of your text.
Best
Klaus
this is one of the biggest crossplatform problems!
I would stick to ONE character encoding scheme and only use this one on all platforms!
In the past I used the windows iso encoding, so I could use the "mactoiso" and "isotomac" functions
to get and set the text into/out of the database.
I used these little selfmade functions while working:
Code: Select all
function mac2win tText
if the platform = "MacOS" then
return mactoiso(tText)
end if
return tText
end mac2win
function win2mac tText
if the platform= "Win32" then
return tText
end if
return isotomac(tText)
end win2mac
...
put mac2win(field XYZ) into tVaribale
## write tVaraiable to database
...
## get tect from database
put win2mac(tVariable) into fld xyz
...
You get the picture.
But this might unfortunately not cover ALL accents/special characters!
If you have problems here, you might need to use UNICODE somehow for all of your text.
Best
Klaus
Re: Help with accented charecters...
P.S.
Maybe getting/setting "the htmltext" of fields will also work with accents etc.
Maybe getting/setting "the htmltext" of fields will also work with accents etc.
Re: Help with accented charecters...
Hi Klaus....
Thanks for your replies... I have no problems with accented characters using the htmlText and MySQL databases, it is just that Sqlite does not seem to want to play nicely, no matter what I try...
take care
Dixie
Thanks for your replies... I have no problems with accented characters using the htmlText and MySQL databases, it is just that Sqlite does not seem to want to play nicely, no matter what I try...
take care
Dixie
Re: Help with accented charecters...
Hi Dixie,
ah, I see, sorry, looks like I misunderstood your problems.
Hm, no idea why SQLite does not cooperate, since this (htmltext) is just pure ASCII text?
ah, I see, sorry, looks like I misunderstood your problems.
Hm, no idea why SQLite does not cooperate, since this (htmltext) is just pure ASCII text?