Read file with accented characters ?

Jan Schenkel janschenkel at yahoo.com
Fri May 19 13:55:44 EDT 2006


--- Zax <zax at tripoy.com> wrote:
> Hello,
> 
> I'm trying to read a text file created with BBEdit
> on Mac OS X. This file
> contains french accented characters.
> Now, in my revolution script (also running on OS X),
> whatever I use :
> 
> get URL ("binfile:" & bbeditFileName)
>  or
> get URL ("file:" & bbeditFileName)
>  or
> open file bbeditFileName for read
>  or
> open file bbeditFileName for binary read
> 
> the result is the same : all accented characters are
> converted like a
> windows text file and the "it" variable contains
> weird text :(
> 
> So, what I'm doing wrong ?
> Thanks in advance for your help.
> ----------------------
> Zax 
> 

Hi Zax,

This sounds like an encoding conflict - could you try
converting it using the macToISO() function after
reading in the data as a binfile?

>From the docs:
##
Use the macToISO function to translate data that was
created on a Mac OS system to the ISO 8859-1 character
set used on Unix and Windows systems.
##

In theory, using the URL 'file:' construct should take
care of that, but maybe Rev needs a little nudge to
catch this conversion.

Hope this helped,

Jan Schenkel.

Quartam Reports for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the use-livecode mailing list