locked
Store and display Japanese characters RRS feed

  • Question

  • User40338685 posted

    Hi,

    Can anyone tell me the best way of storing Japanese characters through ASP.NET.
    I have to put characters into a asp:textbox on one page, which saves it to an Access DB.
    On a second page I want to display the content in a asp:label.

    Should I store the characters directly to the database or should they be encoded, and
    how do I encode the characters? 

    In my web.config i have:

    <globalization fileEncoding="ISO-2022-JP" requestEncoding="ISO-2022-JP" responseEncoding="ISO-2022-JP" culture="ja-JP" uiCulture="ja-JP" />  
     

    On the display page I have:

    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=shift_jis">

     

    Thursday, August 19, 2010 3:41 AM

Answers

  • User-1200560727 posted

    In web.config: <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="ja-JP" uiCulture="ja-JP" />

    For more details, you can refer my post: http://forums.asp.net/t/1561722.aspx

    If you are using sql server as a database then ensure that your coloumn should be nVarchar or nText.

    I hope it will helpful to you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 19, 2010 6:27 AM

All replies

  • User-1148431695 posted

    Hi,

    Please check similar thread in the forum.

    http://forums.asp.net/t/1538592.aspx

    Thanks, 

    Thursday, August 19, 2010 3:58 AM
  • User-1200560727 posted

    In web.config: <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="ja-JP" uiCulture="ja-JP" />

    For more details, you can refer my post: http://forums.asp.net/t/1561722.aspx

    If you are using sql server as a database then ensure that your coloumn should be nVarchar or nText.

    I hope it will helpful to you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 19, 2010 6:27 AM
  • User40338685 posted

    Thank you, this globalization line did the trick:

     

    <globalization fileEncoding="ISO-2022-JP" requestEncoding="utf-8" responseEncoding="utf-8" culture="ja-JP" uiCulture="ja-JP" /> 

    Thursday, August 19, 2010 6:36 AM