Opened 12 years ago

Last modified 2 years ago

#9669 new bug

Can not change the encoding in RTF.

Reported by: Premislaus Owned by: axeld
Priority: normal Milestone: R1.1
Component: Add-Ons/Translators/RTF Version: R1/Development
Keywords: Cc:
Blocked By: #9654 Blocking:
Platform: All

Description

From #9654

Text files created on Windows have a default CP-1250 encoding. Haiku load by default UTF-8 and causes it display of incorrect character set. With the help of StyleEdit and iconv I can change the encoding.

This works for TXT and SRT. Unfortunately does not work for RTF.

Attachments (3)

RTF_wrong_charset_UTF-8.png (147.4 KB ) - added by Premislaus 12 years ago.
RTF_wrong_charset_CP-1250.png (148.3 KB ) - added by Premislaus 12 years ago.
after_save_wth_new_encoding_CP-1250.png (7.6 KB ) - added by Premislaus 12 years ago.

Download all attachments as: .zip

Change History (9)

by Premislaus, 12 years ago

Attachment: RTF_wrong_charset_UTF-8.png added

by Premislaus, 12 years ago

by Premislaus, 12 years ago

comment:1 by Premislaus, 12 years ago

Blocked By: 9654 added
Blocking: 9654 removed

comment:2 by Premislaus, 12 years ago

iconv -f CP1250 -t UTF-8 < file.rtf > new.rtf - Do not change the encoding.

StyleEdit - After saving file with the new encoding, file is damaged.

Last edited 12 years ago by Premislaus (previous) (diff)

comment:3 by Premislaus, 12 years ago

"This works for TXT and SRT." - Changing encoding in SRT partially works in StyleEdit. StyleEdit correctly displays the file, but MediaPlayer not. I need to use iconv. https://dev.haiku-os.org/ticket/9668#comment:1

Last edited 12 years ago by Premislaus (previous) (diff)

comment:4 by axeld, 8 years ago

It seems like the RTF translator does not support or take into account any charsets at all. Do you have an RTF file that is problematic that you can share?

comment:5 by pulkomandy, 4 years ago

Milestone: R1R1.1

comment:6 by axeld, 2 years ago

I just looked at the specification, and it seems that RTF is always using 7-bit ASCII, and can only express other characters using a special notation. IOW nothing should really happen when you iconv it. That doesn't change the fact that we ignore those characters currently AFAICT.

Note: See TracTickets for help on using tickets.