Discussion:
Japanese chars not visible in Outlook new message posted thru mailto:
(too old to reply)
kavi
2006-09-21 07:11:00 UTC
Permalink
-- I am able to save japanese text into HTML(saved as unicode file) and
open it in IE and view the jap chars.
-- I am able to open outlook new message and copy japanese chars into
the subject as well as body.
BUT, I am unable to give the subject line as Japanese text when using
javascript/html tag - mailto:... It opens new message with Boxes or
question marks.
Any help?

<< EXAMPLE HTML>>

<html>
<head>
<Title>Japanese Test Page </Title>
<meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS"
/>
</head>
<body lang=EN-US style='tab-interval:.5in'>
This is Japanese Text: さようなら
<script Language="javascript">
<!--
document.location='mailto:?subject=さようなら&body=さようなら';
-->
</script>
</body>
</html>
Jukka K. Korpela
2006-09-21 11:38:40 UTC
Permalink
Post by kavi
BUT, I am unable to give the subject line as Japanese text when using
javascript/html tag - mailto:... It opens new message with Boxes or
question marks.
First, you shouldn't use the ?Subject hack, even though it is now formally
part of the mailto: protocol. Second, if you use it, the string - as
anything in a URL - should be % encoded according to the specifications.
That is, all characters beyond ASCII, and even some ASCII characters in some
contexts, should be UTF-8 encoded and then each octet represented as %xx
where xx is the two-digit hexadecimal value of the octet.

Even that way, most bets are off, since the ?Subject hack is poorly
implemented; when you throw such a thing at an email program minding its own
business, it may well fail to process the character properly.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Loading...