taviso / wpunix

WordPerfect for UNIX Character Terminals
603 stars 17 forks source link

Unicode Text File Import #34

Open piusbird opened 1 year ago

piusbird commented 1 year ago

There are strange characters when importing from any text file saved on a modernish linux. I use Fedora 37. I suspect this has tp do with unicode as only the punctuation characters seem affected. Does anyone know of a way around this.

taviso commented 1 year ago

Do you have an example text file?

You can use iconv to make it plain ascii, e.g. iconv -f UTF-8 -t ASCII//TRANSLIT < in > out.txt, which will import easily.

That's obviously not optimal though, I think I should add a UTF-8 converter. It shouldn't be difficult!

emendelson commented 1 year ago

@marnold - I can't reproduce this problem under current Ubuntu Mate. I used the text editor Pluma to create a text file (with the default UTF-8 encoding), and all the punctuation is correct when the file opens in WP, and when saved in WP format. What program are you using to create those text files?

taviso commented 1 year ago

Any UTF-8 encoded punctuation that isn't in ASCII will not be interpreted correctly -- there's no logic in WordPerfect to handle that.

It might work if you paste it instead though, because those are translated on input.

emendelson commented 1 year ago

Ah - I understand. We're talking about punctuation characters that don't have corresponding characters in ASCII. I should have figured this one out.

I don't know of any modern Linux software that converts anything TO WordPerfect format, unfortunately. I think the libwpd developers made a start on converting to WP6 format, but I don't think this got anywhere.

piusbird commented 1 year ago

Pasting does indeed work Thanks for the sugguestion