5 Replies Latest reply on Jul 16, 2013 7:32 PM by MSNThomas

    DataURL and Japanese text

    MSNThomas

      Does anyone know how to display Japanese text from a text field in your database on a web viewer?

       

      Using a simple dataurl gives me junk.

       

      This is what I have:

       

      "data:text/html,¶

      <html>

      <body>

      " & Yuuchichu Individual::コンベンション名称 & ¶

      & Yuuchichu Individual::コンベンション英文名称 & "

      </body>

       

       

      Yuuchichu Individual::コンベンション名称 contains Japanese text, and I get junk in my webviewer for it.

      Yuuchichu Individual::コンベンション英文名称 contains English text, and it displays just fine.

       

      Surely there is a way to display text in other languages from the database in the webviewer. If anyone knows how it would really help me out.

        • 1. Re: DataURL and Japanese text
          mbraendle

          As in a webpage, you need to specify the character set used for display in a meta tag:

           

          http://en.wikipedia.org/wiki/Meta_element

           

          The meta elements must be enclosed in the head part, so your data URL would look like

           

          "data:text/html,¶

          <html>

          <head>

          <meta http-equiv="Content-Type" content="text/html; charset={encoding}" >

          </head>

          <body>...

           

          where {encoding} could be UTF-8, SHIFT_JIS or ISO-2022-JP . You have to try out.

          • 2. Re: DataURL and Japanese text
            user14047

            data:text/html,<!DOCTYPE html><html><head><meta http-equiv='content-type' content='text/html; charset=utf-8' /></head><body></body></html>

             

            これでどうでしょうか? charset=utf-8 をいれることで日本語の表示も可能です。

            もし、全てが日本語なら、<html lang='ja'>という形で日本語を宣言してしまうのもいいでしょう。

            • 3. Re: DataURL and Japanese text
              MSNThomas

              Thank you for your replies.

               

              I tried adding both, and for some reason it still won't display the text properly.

               

              I tried adding simple Japanese text, instead of just the data from the field, and it won't display that either.  This is what I'm trying now:

               

              "data:text/html,

              <!DOCTYPE html>

              <html>

              <head>

              <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>

              </head>

              <body>

              <p>国際整形災害外科学会(SICOT)総会</p>

              " & Yuuchichu Individual::コンベンション名称 & " " &  Yuuchichu Individual::コンベンション英文名称 & "

              </body>

              </html>"

               

              and what is displayed:

               

              �V��teb_}p�[ Y�yf[ O �SICOT)�} O

              �V��teb_}p�[ Y�yf[ O �SICOT)�} O World Congress of the International Society of Orthopaedic Surgery and Traumatology -SICOT- ; Triennial World Congress (TWC)

               

              I will say I'm very rusty on my html and didn't have much expertise to begin with.

               

              Also, if it makes any difference, I am using Filemaker Pro 9

              • 4. Re: DataURL and Japanese text
                user14047

                FileMaker Pro 9-11 for Windows の場合は、日本語を数値文字参照 (numeric character reference

                ) に変換しないと表示されません。

                 

                 

                "data:text/html,

                <!DOCTYPE html>

                <html>

                <head>

                <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>

                </head>

                <body>

                <p>" &

                GetAsCSS ( "国際整形災害外科学会(SICOT)総会" ) &

                "</p>" &

                GetAsCSS ( Yuuchichu Individual::コンベンション名称 ) &

                " " &

                GetAsCSS ( Yuuchichu Individual::コンベンション英文名称 ) &

                "</body>

                </html>"

                 

                参考:http://www.fmpro.jp/contents/070031/

                • 5. Re: DataURL and Japanese text
                  MSNThomas

                  Thank worked, thank you so much!

                   

                  助かりました。本当にありがとうございました。