On Oct 12, 2006, at 23:30 UTC, R Charles Flickinger wrote:

> > Well, it's certainly not true that "everything" is UTF-8,
particularly
> > if your application has to send data to or accept data from any
other
> > applications (e.g., via files).
> 
> The only data the app might have to accept could be from the  
> paseboard.  Are strings copied to the pasteboard converted to UTF8?

No, they're left as whatever they are.  However, in at least most
cases, RB should know what encodings these are (i.e., the .Encoding of
such strings should be properly set).  So you'll get automatic
conversion if, say, you concatenate it with a UTF-8 string or stuff it
into an EditField.  But if you just took such a string as-is and write
it to a file, you'll get whatever bytes that string contains.  Is the
pasteboard involved in this Finnish issue?

> Because the app writes html docs, I'm beginning to think it is the  
> resultant HTML files that are at issue, the user in Finland writes  
> that they open in TextEdit rather than Safari.  Not a good  
> beginning.  I advised them to look at Get Info on any .html file and  
> click the Change all. button if they need to.  But if my app is  
> writing .html text as UTF8, I'm thinking it would open in Safari just
> fine.

Not necessarily.  What makes you think Safari will know it's UTF-8? 
There is no standard text encoding for HTML; normally the server
defines this as part of the response headers, IIRC.

I don't use Safari any more, but I seem to recall it has a menu
somewhere for changing what text encoding it assumes.  As does TextEdit
for that matter, though in that case you have to choose it when you
open the file.  If you're writing UTF-8, and it's not displaying
correctly for this user, then it sounds quite likely to me that his
Safari (or TextEdit, as the case may be) is simply assuming the wrong
thing.

Note that writing a byte-order mark will provide a good hint to SOME
(though not all) Unicode-savvy apps, helping them to open the file
correctly.

> I've asked the user in Finland to send email me output from my app  
> from their machine, hoping to see what's going on.

I suspect you'll find that the output is exactly the same as output
created on your machine.  The problem isn't the file per se; it's what
they're using to read it, and how that app is configured.  Again this
is just a result of the world NOT being a UTF-8-only place; all apps
have to deal with text encodings, and since there is no good way to
tell what encoding a particular file might be, they have to make
assumptions and guesses that aren't always correct.

Best,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to