[REBOL] Re: Help needed with accented characters
From: warren:howsoft at: 6-Feb-2008 18:09
Gregg Irwin wrote:
> Hi Bob,
>
> Sounds like an encoding issue. Check the Encoding box in Notepad. If
> it's set to Unicode, that will be your problem. Save the file as ANSI
> and you should be fine. The encoding in Ubuntu may be UTF-8.
>
> Do a READ on the file, in REBOL, and see what the resulting string
> looks like.
>
> -- Gregg
>
---------------------------------------------------------------------
Rebol[]
mylay: layout[
text-list "Florianópolis"
]
view mylay
---------------------------------------------------------------------
Hi Gregg,
With regard to the little example script (repeated above), you have
solved the problem:
1) In Windows XP, saving the script in ANSI allows the script to run and
the display of the word "Florianópolis" to be correct.
2) In Ubuntu, if I save the script in Western (ISO-8859-15) instead of
UTF-8, it has a similar correct result when running the script.
With regards to my real project, as I explained, my list of client names
is loaded in a way which is more complicated than the simple example
above suggests. Each client has a text file in a folder, and the file
name corresponds exactly to his/her name. The text-list is populated by
grabbing the file names from the folder.
You may well ask why I choose to do it this way, which might not be the
most convenient method in relation to Rebol. The answer is that the
original program was written in VB (Windows only), and that I am now
trying to write a similar program for Linux. And the reason for that is
the fact that I have my client data already established in the Windows
version, and I want to transfer it to Linux (or even back to Windows
again) without having to change it.
In my real project, the client data is grabbed as follows:
text-list data read %"names/"
The names of the files (clients) are not displayed correctly in Ubuntu
(but in Windows they are correct).
In Ubuntu, for a correct display in the text-box, how can I do the above
read
in Western (ISO-8859-15) instead of UTF-8?
Bob