Problem with accented words after file out...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with accented words after file out...

William Hubbard
Hi, sorry if this was asked before. I'm using VW 7.5 and when I file out a changeset or package, the accented words like: "Búsqueda" are written like this : "'Búsqueda"
Is there any workaround to this problem?

Bill

Reply | Threaded
Open this post in threaded view
|

Re: Problem with accented words after file out...

Joachim Geidel
William Hubbard schrieb am 27.01.2008 16:38:
> Hi, sorry if this was asked before. I'm using VW 7.5 and when I file out a
> changeset or package, the accented words like: "Búsqueda" are written like
> this : "'Búsqueda"
> Is there any workaround to this problem?

Actually, there is no problem.

When you file out source code from VisualWorks, it is written with a
UTF-8 character encoding. If you file it into another VisualWorks image,
the characters will be decoded correctly.

If you open the file with a text editor like Notepad, it can't know
which encoding was used to write the file. It will usually use the
platform's default encoding, which interprets the bytes differently.
This results in different characters being shown.

You can use accented characters in source code, just don't expect source
code fileouts to be shown correctly in arbitrary text editors. If the
text editor lets you choose an encoding when reading a file, choose
UTF-8, and the text will look as expected.

HTH,
Joachim Geidel

Reply | Threaded
Open this post in threaded view
|

Re: Problem with accented words after file out...

William Hubbard
When I fileIn the source from another image selecting File -> Open File -> File In, actually the character conversion wasn't made. Then I tried the Changes Tool replaying the changes and it worked right, so I suppose there's something different in the file in mechanism.
Thanks again.

2008/1/27, Joachim Geidel <[hidden email]>:
William Hubbard schrieb am 27.01.2008 16:38:
> Hi, sorry if this was asked before. I'm using VW 7.5 and when I file out a
> changeset or package, the accented words like: "Búsqueda" are written like
> this : "'Búsqueda"
> Is there any workaround to this problem?

Actually, there is no problem.

When you file out source code from VisualWorks, it is written with a
UTF-8 character encoding. If you file it into another VisualWorks image,
the characters will be decoded correctly.

If you open the file with a text editor like Notepad, it can't know
which encoding was used to write the file. It will usually use the
platform's default encoding, which interprets the bytes differently.
This results in different characters being shown.

You can use accented characters in source code, just don't expect source
code fileouts to be shown correctly in arbitrary text editors. If the
text editor lets you choose an encoding when reading a file, choose
UTF-8, and the text will look as expected.

HTH,
Joachim Geidel

Reply | Threaded
Open this post in threaded view
|

Re: Problem with accented words after file out...

Alan Knight-2
Indeed. It looks like the workspace is not being clever about setting the encoding for files where it ought to expect a utf-8 encoding, but that file-in mechanisms are. I've created AR 53769 for this.

At 03:36 PM 1/27/2008, William Hubbard wrote:
When I fileIn the source from another image selecting File -> Open File -> File In, actually the character conversion wasn't made. Then I tried the Changes Tool replaying the changes and it worked right, so I suppose there's something different in the file in mechanism.
Thanks again.

2008/1/27, Joachim Geidel <[hidden email]
>:
William Hubbard schrieb am 27.01.2008 16:38:
> Hi, sorry if this was asked before. I'm using VW 7.5 and when I file out a
> changeset or package, the accented words like: "Búsqueda" are written like
> this : "'Búsqueda"
> Is there any workaround to this problem?

Actually, there is no problem.

When you file out source code from VisualWorks, it is written with a
UTF-8 character encoding. If you file it into another VisualWorks image,
the characters will be decoded correctly.

If you open the file with a text editor like Notepad, it can't know
which encoding was used to write the file. It will usually use the
platform's default encoding, which interprets the bytes differently.
This results in different characters being shown.

You can use accented characters in source code, just don't expect source
code fileouts to be shown correctly in arbitrary text editors. If the
text editor lets you choose an encoding when reading a file, choose
UTF-8, and the text will look as expected.

HTH,
Joachim Geidel


--
Alan Knight [|], Cincom Smalltalk Development