Re: Need help with windows chars and mac chars

2010-11-09 Thread JosepM

Hi Mark,

The database is already in UTF8, so the problem is in how characters are
converted. Surely the problem is this.

Salut,
Josep

-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Need-help-with-windows-chars-and-mac-chars-tp3032843p3033358.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Need help with windows chars and mac chars

2010-11-08 Thread JosepM

Hi everyone,

I made a mess with the coding of characters between windows - mac and mac -
windows.

I have a function that encrypts a word and then validates the encrypted word
with the value of the database. In Mac is working properly, but Windows
doesn't. The value produced in Windows encryption has nothing to do with the
Mac. I know the characters differences... but I'm lost. :(

The word is demo, without accents or unusual characters.

What am I missing? Should I convert from Windows with ISOtoMac function?
Also doesn't work.

Any ideas?


Salut,
Josep
-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Need-help-with-windows-chars-and-mac-chars-tp3032843p3032843.html
Sent from the Revolution - User mailing list archive at Nabble.com.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Need help with windows chars and mac chars

2010-11-08 Thread Mark Schonewille
Hi Josep,

You might convert from Windows to Mac using the IsoToMac function, but a few 
characters will be converted incorrectly. Normally, my advice would be to set 
up the entire database with UTF8 encoding and convert all strings to UTF8 
before writing them to the database. Search strings would need to be converted 
to UTF8 too.

I am surprised that even the word demo doesn't work for you, but I guess the 
reason is that the encryption doesn't return the same value on both platforms. 
You need to encode to UTF8 first and then encrypt. How do you do the encryption 
exactly?

When you are sure that the encoding and encryption are correct, then the ASCII 
values of all bytes of the encrypted string should be the same on both 
platforms, even though the characters displayed in a field may be different. As 
a last step, use the binaryEncode function to convert the string from binary to 
hexadecimal. The hex string should be exactly the same on both platforms.

Hexadecimal strings don't need to be encoded as UTF8 again. You can simply 
write to the Mac encoded database, since all characters 0-9 and A-F are the 
same regardless the encoding. 

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Economy-x-Talk on Facebook now and get a free Color Converter license 
http://qurl.tk/gn (read the conditions)

On 9 nov 2010, at 00:30, JosepM wrote:

 
 Hi everyone,
 
 I made a mess with the coding of characters between windows - mac and mac -
 windows.
 
 I have a function that encrypts a word and then validates the encrypted word
 with the value of the database. In Mac is working properly, but Windows
 doesn't. The value produced in Windows encryption has nothing to do with the
 Mac. I know the characters differences... but I'm lost. :(
 
 The word is demo, without accents or unusual characters.
 
 What am I missing? Should I convert from Windows with ISOtoMac function?
 Also doesn't work.
 
 Any ideas?
 
 
 Salut,
 Josep

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution