At 8:36 AM +0100 3/10/03, Jacquot Jules wrote:
enc=encoding(patronymeorg) -> UTF8
What, you're saying RB already knows the encoding of these strings is
UTF-8?
right
How?
That surprises me; I would expect it to be undefined. What
database is this?
Because i have converted my database in UTF-8. Maybe a bad idea ?
No, a fine idea, but not relevant to the question at hand. I'm not
asking what the bytes of the string really are; I believe you when
you say they're UTF-8. But how does REALbasic know this? You just
grabbed a field out of a database cursor; the encoding of that string
should be undefined, unless I'm confused again.
The easiest way to check would be to read it back into RB, define its
encoding as UTF-8, and display it in an EditField or StaticText.
right, but i don't want this because i am not sure that the
recipient of the textfile, who is a windows's man, knows and uses
UTF8.
Ah, then you need to find out what encoding he's using (probably
ISO-Latin-1) and convert your text to that.
With RB 4.x all worked fine.
Probably not; more likely it just *seemed* to work fine because you
happened to only use characters which were the same ISO-Latin-1 as in
MacRoman.
That i have wanted to say is : with a string decoded from UTF-8,
why "writeline()" insert a string coded UTF-8 ?
What else would it do? It writes the string exactly as you have it.
If it's a UTF-8 string, it writes UTF-8; if it's a MacIcelandic
string, it writes MacIcelandic; if it's a random bunch of binary
data, it writes a random bunch of binary data.
Cheers,
- Joe
--
,------------------------------------------------------------------.
| Joseph J. Strout REAL Software, Inc. |
| joe at realsoftware dot com http://www.realsoftware.com |
`------------------------------------------------------------------'
---
A searchable archive of this list is available at:
<http://support.realsoftware.com/listarchives/search.php>
Unsubscribe:
<mailto:realbasic-betas-off at lists dot realsoftware dot com>
Subscribe to the digest:
<mailto:realbasic-betas-digest at lists dot realsoftware dot com>
.
|