windows - macOs char problems

Klaus Major klaus.major at metascape.org
Wed Sep 25 09:40:01 EDT 2002


Bonjour Sylvain,

> Hello,
>  
> I have a MySQL database. I develop some applications with revolution. 
> Those applications have to run with windows and MacOS 9.2.
>  
> And of course, I have charset problems that I can't solve.
>  
> example:
>  
> win numToChar(160) is a space (I don't know the exact word, but I mean 
> that you can't break it!)
> I use it to update my database through my windows revolution 
> application.
> But if I load data from my database through my MacOS revolution 
> application, this char is displayed as †
>  
> é --> È
>  
> â  --> ,
>  
> and so on...
>  
>  
> How can I prevent that ?

Don't know if this is useful to you, but i always use a
hand-made function to serve correct text to win and mac:
Presuming the text comes from a windows-pc !!!

You get the picture...

function cleanuptext the_text
    if the platform contains "win" then
      return the_text
      ## no need to convert...
    end if
   return isotomac(the_text)
   ## convert to mac charset...
end cleanuptext

And then i call it with:

...
put cleanuptext(fld "the returned text from mySQL") into xxx
...

Hope this helps...


Regards

Klaus Major
klaus.major at metascape.org



More information about the Use-livecode mailing list