Page 1 of 1 1
Topic Options
#196877 - 2009-11-30 03:13 PM Not a valid display the non English strings
lostip Offline
Just in Town

Registered: 2009-11-16
Posts: 3
Loc: RU
Hello world,

When working with strings contain only the characters from the Russian alphabet, i noticed one interesting thing

for example see the following code
(администратор is "administrator" in russian)

$a = "администратор"
? $a

output here is truly disgusting piece: 0♦4♦<♦8♦=♦8♦A♦B♦@♦0♦B♦>♦@♦

However, if you write:

$a = "администратор!"
? $a

output what and must be an: администратор!

i.e. if the string contains only the russian word the result is not valid,
but if the string contains at least one space, character (!@#$...) or number (i.e. at least one symbol not Russian alphabet)
we get the correct result

The following code produces the correct result too (not through a variable)
? "администратор"

The CODE PAGE and OS Language in Russian and it does not matter run it locally or remotelly,
in both cases the result is the same

Want to know your opinion on this issue. Thank you in advance.

Top
#196878 - 2009-11-30 03:42 PM Re: Not a valid display the non English strings [Re: lostip]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4400
Loc: New Jersey
Curious - What happens if you turn ASCII mode on?
 Code:
$Prev = SetOption('Ascii', 'On')
Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#196901 - 2009-12-01 09:36 AM Re: Not a valid display the non English strings [Re: Glenn Barnas]
lostip Offline
Just in Town

Registered: 2009-11-16
Posts: 3
Loc: RU
if i turn ASCII mode on

$rc = SetOption('Ascii', 'on')
$a = "администратор"
$b = "администратор!"
? $a + @CRLF + $b

the result is

0♦4♦<♦8♦=♦8♦A♦B♦@♦0♦B♦>♦@♦
рфьшэшёЄЁрЄюЁ!

as you see, it`s not better than in my first post

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (mole) and 592 anonymous users online.
Newest Members
min_seow, Audio, Hoschi, Comet, rrosell
17881 Registered Users

Generated in 0.05 seconds in which 0.023 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org