Hello_UTF32LE.bas and Hello_UTF32BE.bas

Windows specific questions.
robert
Posts: 92
Joined: Aug 06, 2019 18:45

Hello_UTF32LE.bas and Hello_UTF32BE.bas

Postby robert » Dec 19, 2019 4:50

On Windows 10 X64, executing an X64 fbc to compile examples\unicode\hello_UTF32LE.bas outputs this

Code: Select all

I:\dev\FreeBASIC-1.07.1-win64\examples\unicode>fbc hello_UTF32LE.bas
hello_UTF32LE.bas(1) error 3: Expected End-of-Line


On Linux Fedora 31 X64, hello_UTF32LE.bas compiles and executes as expected

On Windows 10 X64, executing an X64 fbc to compile examples\unicode\hello_UTF32BE.bas produces an .exe but the .exe does not run as expected.
TJF
Posts: 3546
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Hello_UTF32LE.bas and Hello_UTF32BE.bas

Postby TJF » Dec 19, 2019 9:32

The source file examples\unicode\hello_UTF32LE.bas may have linux line endings (!"\n"), while wodniws expects !"\n\r".
robert
Posts: 92
Joined: Aug 06, 2019 18:45

Re: Hello_UTF32LE.bas and Hello_UTF32BE.bas

Postby robert » Dec 20, 2019 0:59

TJF wrote:The source file examples\unicode\hello_UTF32LE.bas may have linux line endings (!"\n"), while wodniws expects !"\n\r".

Hi Thomas:

The end of line encodings are correct for the files in question.

For the hello_UTF32LE.bas, the EOL encoding is

Code: Select all

D0000000A0000000

For the hello_UTF32BE.bas, the EOL encoding is

Code: Select all

0000000D0000000A


I think the problem is that the Windows version fbc UTF32 parser is not parsing the code correctly.
robert
Posts: 92
Joined: Aug 06, 2019 18:45

Re: Hello_UTF32LE.bas and Hello_UTF32BE.bas

Postby robert » Dec 20, 2019 2:22

robert wrote:On Windows 10 X64, executing an X64 fbc to compile examples\unicode\hello_UTF32LE.bas outputs this

Code: Select all

I:\dev\FreeBASIC-1.07.1-win64\examples\unicode>fbc hello_UTF32LE.bas
hello_UTF32LE.bas(1) error 3: Expected End-of-Line


On Linux Fedora 31 X64, hello_UTF32LE.bas compiles and executes as expected

On Windows 10 X64, executing an X64 fbc to compile examples\unicode\hello_UTF32BE.bas produces an .exe but the .exe does not run as expected.


32 bit FreeBASIC-1.07.1-win32 is O.K. Both files compile and execute as expected.
jj2007
Posts: 1396
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Hello_UTF32LE.bas and Hello_UTF32BE.bas

Postby jj2007 » Dec 20, 2019 2:53

TJF wrote:The source file examples\unicode\hello_UTF32LE.bas may have linux line endings (!"\n"), while wodniws expects !"\n\r".

The source file is UTF-32, and most editors don't digest that format. You can convert it, though, and then it compiles just fine: Utf-32 to Utf-16 converter

Return to “Windows”

Who is online

Users browsing this forum: No registered users and 4 guests