close
Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Opened 3 years ago

Last modified 7 months ago

#7 accepted bug

Handling of charsets (e.g. UTF-8) when using external editor.

Reported by: emptystate@… Owned by: somebody
Priority: normal Milestone: YAM 2.9
Component: charset handling Version: 2.5
Severity: major Keywords:
Cc: Blocked By:
Blocking:
Release Notes:

Description (last modified by damato)

When receiving an email with a charset that is not supported by the font system (I think, I don't know how YAM is detecting this charset), YAM shows a question mark for every character that is not standard ASCII. When YAM passes this mail to an external program or saves as a file it still replaces the characters with question marks. YAM should not replace these characters in these situations.

For example, my friend recently sent me an email in UTF-8 with an attachment. Their MUA decided to package the text as base64. In YAM when I read this mail I get "????? ?? ????" etc in the message window. If I save the displayed message I get the same "????? ?? ????" etc, if I save the raw message I get base64. If I try to reply and call an external editor that can handle the character coding, YAM passes it the "????? ?? ????" text instead of the original text.

Just FYI, this did not occur in YAM 2.4.


Moved from SF:
https://sourceforge.net/tracker/?func=detail&aid=1972552&group_id=13560&atid=113560

Attachments (0)

Change History (12)

comment:1 Changed 3 years ago by damato

I think I see what's happening: codesets.library sees that the text cannot
be converted into something compatible with my locale.

If that's the case then this is a big problem. I don't want to switch my
system locale every time I get an email in a different language. Also, I
can't see MorphOS or AmigaOS supporting all languages any time soon, the
only way I can access the text will be to save it as raw from YAM, base64
decode it and then load into an appropriate viewer.

Is it possible to ask codesets.library if it can convert the text or not;
if not, give the user the option of saving the mail in the original coding
(i.e. base64 decoded, headers removed etc) ?


Moved from SF. Original poster: hill28

comment:2 Changed 3 years ago by damato

  • Priority changed from major to undecided
  • Severity set to major

comment:3 Changed 3 years ago by damato

  • Component changed from stable build to codeset handling

comment:4 Changed 3 years ago by damato

  • Cc yamos-svn@… removed

comment:5 Changed 3 years ago by damato

  • Priority changed from undecided to normal
  • Status changed from new to pending

Can you please supply the mail in question that is base64 encoded and causes the issue to appear so that we can reproduce the issue on our own machine and think about a possible solution?

comment:6 Changed 3 years ago by emptystate@…

I was the reporter of this bug.

I just checked the behaviour of this problem in YAM 2.6 and I need to revise the description a little.

  1. I receive an email in UTF-8, encoded as Base64.
  2. YAM displays ????? for glyphs in the message (glyphs for this coding are not available so this is OK).

3a. Saving raw text results in Base64 plus headers, as expected.
3b. Saving the displayed text results in a "???? ????" type message (not UTF-8).
3c. If I hit reply and then call an external editor, the text passed is the "???? ????" type message.

When I receive a message coded in this style I have to save in raw format, edit to remove the email headers and decode the Base64. This is functionality already existing in YAM.

I think the correct behaviour should be:

3b. YAM decodes the message from Base64 and saves UTF-8.
3c. YAM passes the UTF-8 message to the external editor instead of the processed version.

I am sure you can easily manufacture your own test message, but let me know if you still need test data.

comment:7 Changed 3 years ago by damato

  • Milestone set to YAM 2.7
  • Status changed from pending to accepted
  • Summary changed from Handling of charsets to Handling of charsets (e.g. UTF-8) when using external editor.

Ah ok. now I get it. So the problem is that YAM does not pass plainly pass the UTF-8 mail to an external editor. However, we have to find a general solution for that because there might be users without a UTF-8 capable editor and thus they don't want to have 3-byte characters in their external editors. So we have to think about it once more. But I admit that the current solution is suboptimal.

comment:8 Changed 3 years ago by damato

  • Reporter changed from hill28@… to emptystate@…

comment:9 follow-up: Changed 3 years ago by emptystate@…

thus they don't want to have 3-byte characters in their external editors

UTF-8 encoded text may have 1, 2, 3 or 4 bytes per character.

there might be users without a UTF-8 capable editor

How can YAM know what software I have and what it is capable of ? Surely external software will have to decide for itself if it can handle the input ?

comment:10 in reply to: ↑ 9 Changed 3 years ago by damato

Replying to emptystate@…:

there might be users without a UTF-8 capable editor

How can YAM know what software I have and what it is capable of ? Surely external software will have to decide for itself if it can handle the input ?

YAM cannot know that. That's why we have to think carefully about that and eventually introduce an option or possibility to enable/disable the new functionality as soon as we have implemented that.

comment:11 Changed 19 months ago by damato

  • Description modified (diff)
  • Milestone changed from YAM 2.7 to YAM 2.8

comment:12 Changed 7 months ago by damato

  • Milestone changed from YAM 2.8 to YAM 2.9

Add Comment

Modify Ticket

Action
as accepted .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber

  • emptystate@…(Reporter, Participant)