2 Replies Latest reply on Jun 10, 2004 2:20 PM by m.w.park

    any schedule for i18n?

    m.w.park

      hi all!
      is there any plans for supporting i18n?
      i found nukes useful and wanna use it for my site under construction.
      but, all the korean characters were broken.
      so, i added a locale ko(korean) in CoreModule.java, translated a couple of messages.
      but still got the broken chars.
      after that, i read the previous topics about i18n(maybe chinese).
      yeah, page source contains ugly numeric entities.

      when i18n support will be done?
      or, is there any clue for doing this?
      i really wanna see korean chars on nukes.

      regards,
      Park

        • 1. Re: any schedule for i18n?

          Hello,

          Please have a look at the Encoding topic on this page. I have invested some time to have a look into the problem and it seems, that i18n regarding the encoding is not a problem on the nukes side so far as I know. You have only to add the appropriate encoding to the response in PageResult.java so Tomcat is able to encode the response appropriately.

          By doing this, you only get question marks in the response. If you disable the gzip filter in the web.xml, you get encoded characters, but not in UTF-8 in my case. GZip, are there problems with 7-bit 8-bit transformation?

          You can do a simple modification to NukesServlet and override the doGet() method by simply output your characters:

          protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
           {
           resp.setContentType("text/html; charset=UTF-8");
          
           Writer out = resp.getWriter();
           out
           .write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
           out.write("<HTML>");
           out.write(" <HEAD><TITLE>Encoding Servlet</TITLE></HEAD>");
           out.write(" <BODY>");
           out.write(" <H1>Hallo, - über meinem Haupt ist der Himmel</H1>");
           out.write(" </BODY>");
           out.write("</HTML>");
           out.flush();
           out.close();
          


          This code in a simple servlet deployed on Tomcat 4 or 5 outputs the right characters. But the code above does not output the right characters. But I have no glue where is the difference between disabling all relevant filters in nukes and the servlet deployed in Tomcat.

          Probably you have some idea?


          Regards,

          Cyrill

          • 2. Re: any schedule for i18n?
            m.w.park

            Thanks Cyrill

            it was my mistake.
            i'm testing chars in html module.
            it seemed to be changing all the tags (<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>) to EUC-KR(korean) didn't help.
            but, displaying the chars was not the problem.
            when i selected the nuke_file table all i can see was the broken chars.
            updating the record by hand solved the problem. i got beautiful korean chars.

            before inserting the record is problem i think.
            TextPlugin.java has following line

            ctx.next("gui").put("BASE", page.getServerBase()).put("LANG", "en");

            simply i changed "en" to "ko" but it didn't help.

            regards,
            Park