xsharp.eu • X# and China
Page 1 of 1

X# and China

Posted: Tue Jun 16, 2020 1:31 pm
by xinjie
Hello everyone,
I translated some information about X# to Simplified Chinese and published them on forum in China. If you haven’t seen the magic square text, then you have a chance now :)
http://www.mzvfp.com/thread.php?fid=104

When I download the latest version of X#, the process was painful. It took several hours and replaced two Internet providers and three lines.:(
So without the consent of the development team, I also transferred the installation program to the above network address to facilitate the download of FOXER in China( if they are interested in X#)。Please forgive me.

Thanks to the development team!

X# and China

Posted: Tue Jun 16, 2020 3:40 pm
by ArneOrtlinghaus
Hello xinjie,
nice to hear something from another country.
Just because I'm interested:
I believe that Foxpro until now did not support Unicode. Until now I had the impression that in countries with double byte code the move to modern Unicode oriented programs was much quicker than in America and Europe - just because of the need for supporting the language.
Or could you already use Foxpro mixed with Chinese/English?
Arne

X# and China

Posted: Tue Jun 16, 2020 5:54 pm
by robert
Arne,

It is a common misunderstanding that Ansi and Asian languages do not work together.
However Ansi DOES support Chinese, Japanese etc.
The lower half of the 255 characters are the same as in other codepages.
Most characters in the upper half work like 'gateways' into extra tables.
For example when a string in the Chinese Ansi codepage 936 contains the byte 0x81 then this character leads to a second page of characters.
You can see an example on
https://icu4c-demos-7hxm2n5zgq-uc.a.run ... indows-936
If you click on the links on the characters 0x81, 0x82 etc you will see pages and pages of Chinese characters.

That is why Ansi is also called 'MultiByte' and why the conversion functions in windows are called MultiByteToWideChar and WideCharToMultiByte.
That is also why VO has special functions for string operations on Multibyte strings, such as MBLen(), MBLeft() etc.
To take for example the first 3 characters of a multibyte string you cannot use Left() because that will return the first 3 bytes. MbLeft() however takes into account that some characters are actually represented by 2 bytes.

FoxPro has similar functions Left() (for single byte strings) and LeftC() for multi byte strings.
Fortunately inside .Net everything is Unicode, so most people do not have to think about this anymore.

Robert

X# and China

Posted: Wed Jun 17, 2020 7:49 am
by ArneOrtlinghaus
Thank you for explaining. I forgot that multi byte codes in a language depending code page can be the solution without need of Unicode. When we moved partially to the Unicode world for an international customer 15 years ago I wondered why it was so easy to work with Chinese and Japanese and why we had so many problems with Russian and some other languages. But the reason must have been in the operating systems and the better implementation of standards. We found that many users in China and Japan used Windows XP, that 15 years ago was able to connect Unicode and national code pages in a very complete way. Other countries did not have this need and people could work much longer with elder operating systems.

X# and China

Posted: Wed Jun 17, 2020 11:27 am
by xinjie
@ArneOrtlinghaus
VFP does not support Unicode in fact until it "dies".
In a double-byte system, mixing Chinese and English is common. My knowledge cannot be like Robert, so I cannot fundamentally explain this phenomenon.Nonetheless, some friends I know also "give up" VFP because of Unicode.

X# is based on .NET FrameWork, so I believe that for FOXER, Unicode and multithreading are easier to implement.

I believe X# is the future of XBASE.

X# and China

Posted: Wed Jun 17, 2020 11:48 am
by wriedmann
Hi Xinjie,
X# is based on .NET FrameWork, so I believe that for FOXER, Unicode and multithreading are easier to implement.
X# IS working in Unicode mode - there is nothing to implement.
And multithreading works as in every other .NET language like C# and VB.NET.

Wolfgang