Bill Allombert on Wed, 19 Apr 2017 14:43:27 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: PARI/GP for Windows doesn't support umlauts and diacritical signs but it's possible |
On Wed, Apr 19, 2017 at 01:42:56PM +0200, Bill Allombert wrote: > On Wed, Apr 19, 2017 at 07:42:41AM +0200, Jens Schmidt wrote: > > PARI/GP for Windows only supports ASCII chars in input and output. The > > programm should set the both codepages for input and output to the > > default value given by Windows registry (called ACP: ANSI codepage). > > That is easily done by some C code at startup: > > > > SetConsoleCP( GetACP() ); > > SetConsoleOutputCP( GetACP() ); > > > > By default the codepage of a Windows console is set to ancient DOS 437 > > or 850,... called OEMCP. These old OEM codepages aren't recommend. > > > > ACP is CP 1252 by default (aka Western) which is nearly identical to > > ISO-8859-1 and UTF-8 (Latin1 block). Windows uses some of the characters > > 0x80 .. 0x9f which are non-printable chars in ISO-8859-1 and UTF-8. > > > > Windows has very limited support for UTF-8 console (codepage 65001). > > UTF-8 file/console redirect isn't possible because Windows doesn't > > support multibyte file IO - only single byte and wide chars. > > > > I've tested this with Windows 7 and Wine in Linux. Setting codepages > > functions too through a PARI/GP plugin which could be installed at any > > time and would make older versions working. > > Hello Jens, > Thanks for your suggestion. > I tried to write a patch following your suggestion but it did not seem > to change anything on wine. See below. Actually it works when readline is disabled. Cheers, Bill.