X# and China

We encourage new members to introduce themselves here. Get to know one another and share your interests.
Post Reply
User avatar
xinjie
Posts: 108
Joined: Wed May 20, 2020 10:05 am
Location: China
Contact:

X# and China

Post 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!
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
User avatar
ArneOrtlinghaus
Posts: 413
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

X# and China

Post 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
User avatar
robert
Posts: 4540
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

X# and China

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
ArneOrtlinghaus
Posts: 413
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

X# and China

Post 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.
User avatar
xinjie
Posts: 108
Joined: Wed May 20, 2020 10:05 am
Location: China
Contact:

X# and China

Post 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.
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
User avatar
wriedmann
Posts: 3765
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

X# and China

Post 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
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Post Reply