CE characters

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

CE characters

rush
Hi,

I have just noticed, under D5, when I enter some croatian characters within
a string, they get replaced by question mark i.e. :

'èæ¾¹ðÈÆ®©Ð' ctrl-d turns into:

'??¾¹???®©'

It is not just display issue, if I inspect the string, the characters are
permanently replaced with queation mark. However if I read a string from
some external source like FileStream, they get readed ok, and they display
fine.

rush


Reply | Threaded
Open this post in threaded view
|

Re: CE characters

Bill Schwab-2
Rush,

> I have just noticed, under D5, when I enter some croatian characters
within

> a string, they get replaced by question mark i.e. :
>
> 'èæ¾¹ðÈÆ®©Ð' ctrl-d turns into:
>
> '??¾¹???®©'
>
> It is not just display issue, if I inspect the string, the characters are
> permanently replaced with queation mark. However if I read a string from
> some external source like FileStream, they get readed ok, and they display
> fine.

My guess is that the compiler is causing your problem.  A (perhaps painful)
workaround might be to create a byte array with the right character codes
and then send #asString (or is it #asUnicodeString) to it.  If you are
having problems with only a small number of characters, you might start with
a string, then convert to a byte array, fix the offending codes, and then
convert back.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: CE characters

rush
"Bill Schwab" <[hidden email]> wrote in message
news:aq93sd$7ilsj$[hidden email]...
> Rush,
>
> > I have just noticed, under D5, when I enter some croatian characters
> within
> > a string, they get replaced by question mark i.e. :
>
> My guess is that the compiler is causing your problem.  A (perhaps
painful)
> workaround might be to create a byte array with the right character codes
> and then send #asString (or is it #asUnicodeString) to it.  If you are
> having problems with only a small number of characters, you might start
with
> a string, then convert to a byte array, fix the offending codes, and then
> convert back.

Thanks for the workaround Bill, something similar is allready happening in
most of my applications since they read all of the displayed text from the
language files with translations. This is also the reason why it went for so
long befere I spoted it.

However, I was doing a small Smalltalk introduction to my nethew, somethin
along side "hello world from: first name last name" but in Croatian, when my
reputation was demolished in his eyes. Highly embarassing afair! ;))

Anyway, I have checked with D4 and everthing is fine there, and I hope OA
will fixit also for the D5.

rush


Reply | Threaded
Open this post in threaded view
|

Re: CE characters

Blair McGlashan
In reply to this post by rush
"rush" <[hidden email]> wrote in message
news:aq8j61$dof2$[hidden email]...
> Hi,
>
> I have just noticed, under D5, when I enter some croatian characters
within

> a string, they get replaced by question mark i.e. :
>
> 'èæ¾¹ðÈÆ®©Ð' ctrl-d turns into:
>
> '??¾¹???®©'
>
> It is not just display issue, if I inspect the string, the characters are
> permanently replaced with queation mark. However if I read a string from
> some external source like FileStream, they get readed ok, and they display
> fine.

As I recall, this issue may be caused by the character set configured into
the RichEdit control by default - try inspecting a workspace view using the
Visual Object Finder, and send it #rtfText, from which you will see that a
particular character set is specified. Have you tried changing the default
workspace font and selecting the correct character set (described as
'Script' in the font dialog)?

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: CE characters

rush
"Blair McGlashan" <[hidden email]> wrote in message
news:aqbrsq$8jgjf$[hidden email]...

> "rush" <[hidden email]> wrote in message
> news:aq8j61$dof2$[hidden email]...
> > Hi,
> >
> > I have just noticed, under D5, when I enter some croatian characters
> within
> > a string, they get replaced by question mark i.e. :
> >
> > 'èæ¾¹ðÈÆ®©Ð' ctrl-d turns into:
> >
> > '??¾¹???®©'
> >
> > It is not just display issue, if I inspect the string, the characters
are
> > permanently replaced with queation mark. However if I read a string from
> > some external source like FileStream, they get readed ok, and they
display
> > fine.
>
> As I recall, this issue may be caused by the character set configured into
> the RichEdit control by default - try inspecting a workspace view using
the
> Visual Object Finder, and send it #rtfText, from which you will see that a
> particular character set is specified. Have you tried changing the default
> workspace font and selecting the correct character set (described as
> 'Script' in the font dialog)?

Thanks,

that has solved the problem. It was confusing for me since characters have
been displayed ok before accepting them, and only that turned them into
question marks. Anyway, it works ok when I have changed the script.

rush