Utf8 converter is missing in HostTextConv.

Usage of the framework, compiler and tools

Utf8 converter is missing in HostTextConv.

Postby Zinn » Mon Apr 22, 2019 5:51 pm

In the past I work with Linux on my notebook and with Windows 10 on my desktop computer. Now I changed may desktop also to Linux Mint Cinnamon 19.1 Tessa.
Now I realised that Windows log and text files still using old code page format but Linux uses modern utf8 format.

We have in HostTextConv the converter for Text, RichText and Unicode but I miss the converter for Utf8.

Shouldn't we add the procedures ImportUtf8 & ExportUtf8 from CpcUtf8Conv to the HostTextConv?
What is your opinion?

- Helmut
Zinn
 
Posts: 71
Joined: Mon Nov 24, 2014 10:47 am

Re: Utf8 converter is missing in HostTextConv.

Postby Ivan Denisov » Thu Apr 25, 2019 5:26 pm

Good initiative.
User avatar
Ivan Denisov
 
Posts: 255
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Utf8 converter is missing in HostTextConv.

Postby Ivan Denisov » Fri Apr 26, 2019 5:36 am

Zinn wrote:Now I changed may desktop also to Linux Mint Cinnamon 19.1 Tessa.

Also installed it yesterday :)

After BIOS update in Windows destroy the order of my UEFI records from which Debian usually starting, I decided to try Mint, because it uses my favorite Cinnamon desktop (I used it in Debian) and at the same time it is based on Ubuntu with good support of CUDA and Nvidia Drivers (need for molecular modeling).

I have checked, that BlackBox for Linux is working well if you use this commands set:
Code: Select all
wget http://dev.obertone.ru/dev.obertone.ru.gpg.key
sudo apt-key add dev.obertone.ru.gpg.key
sudo dpkg --add-architecture i386
echo "deb [arch=i386] http://dev.obertone.ru/bionic testing main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install bbcb
User avatar
Ivan Denisov
 
Posts: 255
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Utf8 converter is missing in HostTextConv.

Postby Robert » Fri Apr 26, 2019 9:23 pm

Zinn wrote:Shouldn't we add the procedures ImportUtf8 & ExportUtf8 from CpcUtf8Conv to the HostTextConv?
What is your opinion?

Seems like a reasonable idea to me.

Are the existing converters documented anywhere - should they be?
User avatar
Robert
 
Posts: 127
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: Utf8 converter is missing in HostTextConv.

Postby Josef Templ » Sat Apr 27, 2019 10:02 am

adding utf8 converters is a good idea for me.
What would be the file name extension? Is there any standard for that?

- Josef
Josef Templ
 
Posts: 222
Joined: Tue Sep 17, 2013 6:50 am

Re: Utf8 converter is missing in HostTextConv.

Postby Zinn » Sat Apr 27, 2019 12:04 pm

Josef Templ wrote:What would be the file name extension? Is there any standard for that?

In Windows I don't know any standard extension.
In Linux I often use it with extension .sh (bash script).
Original the the Importer / Exporter was used by Romiras with extension .cp

Further in Windows there is CR and LF at end of line
and in Linux LF only at end of line

- Helmut
Zinn
 
Posts: 71
Joined: Mon Nov 24, 2014 10:47 am

Re: Utf8 converter is missing in HostTextConv.

Postby Zinn » Tue Apr 30, 2019 7:21 am

I prefer to select all files, because all txt and log files in Linux are using Utf-8
- Helmut
Zinn
 
Posts: 71
Joined: Mon Nov 24, 2014 10:47 am

Re: Utf8 converter is missing in HostTextConv.

Postby Josef Templ » Wed May 08, 2019 7:14 pm

.utf8 seems to be the 'official' extension for UTF-8 text files.
In addition, there could be the Converters.importAll flag set for such a converter.
I don't know exactly what it changes, though.
For decoding arbitrary binary files, however, this may lead to utf-8 decoding errors and the
question is how to handle them, e.g. output a question mark or similar.

When reading, CR-LF and LF can both be treated equally.
When writing, it may be a good idea to adapt to the platform (Win or Wine)

- Josef
Josef Templ
 
Posts: 222
Joined: Tue Sep 17, 2013 6:50 am

Re: Utf8 converter is missing in HostTextConv.

Postby Zinn » Sat May 11, 2019 5:55 pm

Hello Josef,
the module at http://www.zinnamturm.eu/downloadsAC.htm#CpcUtf8Conv worked as you describe during reading CR-LF and LF.
The Writing is adapted to the Wine platform. But it does not check any errors. The part about SetFont should be deleted.
Of course the extension can changed to .utf8
Helmut
Zinn
 
Posts: 71
Joined: Mon Nov 24, 2014 10:47 am


Return to Common questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron