Outlook, не обрабатывающий многобайтовые символы при использовании mailto:

Один из подходов, который намного лучше, чем грубая сила (но, по общему признанию, все еще дорогой), заключается в использовании понятия «стандартная форма» в первой связанной статье. Получив n, сгенерируйте каждую стандартную форму степени n, оцените ее и сохраните все значения в наборе. В конце проверьте размер набора.

Грамматика для стандартной формы:

S -> (2 ^ P)
P -> (S * P)
P -> S
S -> 2

Вы начинаете с S, и в конце у вас должно быть n терминалов (т.е. 2 с).

1
задан Community 23 May 2017 в 12:13
поделиться

2 ответа

Вы не указываете кодировку, поэтому Outlook (или тот, кто дает адрес Outlook) может только догадываться. В случае вашего HTMl-фрагмента, попробуйте, указав кодировку (UTF-8) явно в , изменит это поведение.

Что касается cmd, он действительно не справляется с UTF-8. Однако он обрабатывает Unicode как UTF-16, хотя и с некоторыми проблемами.

Когда я пробую это здесь (хотя Windows Live Mail вместо Outlook), все в теме преобразуется в устаревшую кодовую страницу, поэтому наличие CJK должно быть проблема.

Однако мне интересно, почему вы пытаетесь неправильно использовать cmd , чтобы пользователь все равно мог писать почту. Конечно, есть альтернативы получше (хотя в настоящее время я не знаю ни одной, потому что она мне никогда не была нужна).

0
ответ дан 3 September 2019 в 01:28
поделиться

I guess your Java mailer works OK but to be sure, try switching to JavaMail.

Have a look at this post. Outlook 2003 by default does not correctly recognize the character encoding of HTML mails (in many case) even though they contain the appropriate tag:

 <meta http-equiv="content-type" content="text/html; charset=UTF-8">

You can switch to Outlook 2007 and/or open the mail in editor and adjust the message properties:

  • open the message
  • Edit -> Edit message
  • Format -> Encoding -> select new encoding
  • File -> Save

Edit: Corrections after the question changed.

Edit2: Sorry hadn't read the full question.

I see you have the Java 5 constraint but if the implementation is also tied to Windows, consider using a JNI/JNA based solution (unfortunately I cannot give you links on that). I would also have a look at the OpenJDK's Desktop API implementation and extract the way from it.

Another option would be to somehow pass in the message without URLEncoding it?

Also if there is a requirement for the user to customize the message before sent, you could provide a simple editor for that within your application and still send the message via JavaMail.

You could also offer the cooperative way of preparing the message for the user, putting it onto the clipboard and open the e-mail client for the user. Then the user only needs to issue a CTRL+V to paste in the prepared text.

0
ответ дан 3 September 2019 в 01:28
поделиться
Другие вопросы по тегам:

Похожие вопросы: