10

Is it possible to add Japanese text between a starting and closing anchor tag as follows in a Rich Text field?

<a href="/downloads.jsp">ダウンロード</a>

I tried it and published the page. But when I view the content on the page strange characters like these appear -業種別ソリューション

Am I missing anything?

2 Answers 2

11

Sunil, it is difficult to tell from your question what your role and knowledge of Tridion is. It would be great if we can encourage more content editors with good questions here. However, I will answer this from a Tridion Developer perspective...

There are six things that I would check for initially:

  1. How does the content look after you 'Save and close' the Component and then re-open it? Is the Japanese text still in place and correct?
  2. How does the content look in the Output of Template Builder? Is it still intact? If so, then it is probably not your templates (both Page and Component Templates) affecting the published output.
  3. How is your Publication Target configured? You need to ensure that the content is published using an encoding, such as UTF-8, that can represent the characters that you're trying to publish. It appears from your code that you are using a Java based technology. Therefore, your Publication Targets should look something like this:enter image description here
  4. How does the published page look on the webserver's filesystem? I suspect that this will contain the 'strange characters' within the link tag. If this is true, and you have checked the above, then ensure that the encoding of all of the configuration files is UTF-8.
  5. How does the source of the published page look? I would expect this to be the 'strange characters' that you report, but worth checking.
  6. Can you see Japanese characters on other Japanese websites? Again, I would expect this to be okay, but it can rule out things like missing language packs, etc.

I have covered some of the steps that I would follow here, rather than just giving an answer. I would suspect that it is point number 3 though.

Alvin has also created an excellent 'Character Encodings with Tridion' article on this topic too!

It could also be the encoding used by you .NET or Java/JSP website. If your site is in .NET then you can control this in your web.config's globalisation settings. If it is Java based then I think that response.setCharacterEncoding("UTF-8"); will do this.

Hope it helps!

3
  • 6
    my experience tells me most of the time, somewhere along the line, it is not set to UTF-8. SDL Tridion will store it correctly in the database, but transport/deployment is usually an issue indeed, see also this blogpost from Elena elenaserghie.blogspot.nl/2012/01/… May 31, 2013 at 7:31
  • 1
    This jsp page is actually included in another jsp page when rendered. The main page had the UTF-8 encoding, but the included jsp page didn't have it. I added <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF8" %> in that page's template and it worked. May 31, 2013 at 16:25
  • I'm glad it worked. Thanks for the feedback. Jun 3, 2013 at 16:09
11

Preview your page in the SDL Tridion CME and check if the expected Japanese characters are showing up - I am pretty sure, you will be able to see the correct Japanese characters unless you have done some explicit wrong coding in the template related to the Character Encoding.

If the Above stands true, go to the (or may be ask your system admin) to check for the Publication Target (on which you are publishing) and ensure the "Default Code Page" is set to at least UTF - 8 (and not the System Default), see the screen shot below:

enter image description here

If it still does not resolve the issue or the above two things are set up as expected, then go the web application server and see if the encoding for the website has been set up correctly.

For example: If your end application is ASP.NET based, in the corresponding web.config, you may need to add the below line:

<system.web>
<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" 
                                                 culture="ja-JP" uiCulture="de-DE"/>
</system.web>

I hope it helps

1
  • 3
    all correct, but don't forget the file encoding of the JVM, since deployment is still done by a Java process and on a Windows server by default that uses Cp1252 which will cause problems when you actually need utf-8 May 31, 2013 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.