Menu

UTF8

Help
Sean
2007-07-24
2012-12-29
  • Sean

    Sean - 2007-07-24

    Hi,

    How do I actually implement & test UTF8 functionality?

    Thanks,

    Sean

     
    • K.S. Bhaskar

      K.S. Bhaskar - 2007-07-25
       
    • George James

      George James - 2007-07-31

      If you want to use utf-8 support GT.M requires that both the libicu36 and locales packages are installed *before* you install GT.M.

      Also, when configuring locales you need to ensure that the en_US.UTF-8 locale is generated as this appears to be required.

      If your system doesn't have these packages installed the configure script will not create a UTF-8 capable installation.  If your $gtm_dist directory does not have a utf8 sub-directory then one of the above conditions was not satisfied (look at the ./configure script to find out more about what it is exactly checking for).

      Two other settings to attend to after installation are the LC_CTYPE and gtm_chset environment variables.

      BTW on Debian, at least, you can install the above packages using the following commands:
      $sudo apt-get install libicu36
      and
      $sudo apt-get install locales

      Hope that helps.

       
    • Sean

      Sean - 2007-08-20

      Not sure what I missed here, but I'm getting an error:

      GTM-I-TEXT, Object compiled with CHSET=UTF-8 which is different from $ZCHSET

      # from icu setup

      # tar -xf icu4c-3_6-src.tgz
      # cd icu/source
      # chmod +x runConfigureICU configure install-sh
      # ./runConfigureICU Linux --disable-64bit-libs --disable-threads
      # gmake
      # gmake check
      # gmake install

      # from .bash_profile

      LD_LIBRARY_PATH="/usr/local/lib/"
      export LD_LIBRARY_PATH
      LC_CTYPE="en_US.UTF-8"
      export LC_CTYPE
      gtm_chset="UTF-8"
      export gtmchset
      gtm_dist="/opt/gtm/V52001"
      export gtm_dist
      gtmgbldir="/opt/gtm/V52001.gld"
      export gtmgbldir
      if [ "$gtm_chset" = "UTF-8" ] ; then
        if [ -e $gtm_dist/utf8 ] ; then
          gtm_dist="$gtm_dist/utf8"
          export gtm_dist
        fi
      fi
      gtmroutines=". $gtm_dist"
      export gtmroutines
      gtm="$gtm_dist/mumps -direct"
      export gtm
      mupip="$gtm_dist/mupip"
      export mupip
      lke="$gtm_dist/lke"
      export lke
      gde="$gtm_dist/mumps -r ^GDE"
      export gde
      dse="$gtm_dist/dse"
      export dse
      PATH=$PATH:$gtm_dist

      # all done before install

      # mumps -direct

      GTM>s ^x=1

      GTM>d ^%g

      %GTM-E-INVOBJ, Cannot ZLINK object file due to unexpected format
      %GTM-I-TEXT, Object compiled with CHSET=UTF-8 which is different from $ZCHSET

      GTM>w $ZCHSET
      M

      Any suggestions sincerely appreciated!

      Thanks,

      Sean

       
      • Steven Estes

        Steven Estes - 2007-08-20

        The binaries built for M code by M and UTF-8 mode differ. This is why there is a utf8 subdirectory from the base gtm_dist that you choose. Was ICU installed before you installed GTM? If not, then the UTF8 install was not done. Try reinstalling GTM and verify there is a populated utf8 directory..

        Steve

         
      • Steven Estes

        Steven Estes - 2007-08-20

        I apologize. It has been pointed out that I misread your post and answered the wrong issue.

        You evidently did get a good UTF8 build or the UTF8 binaries would not exist. But something set/reset gtm_chset prior to you invoking GTM so it started in M mode. The gtm_chset environment variable is THE trigger for what mode the mumps binary starts in so must be set every time. So both pieces have to be set correctly: gtm_dist has to point to the utf8 subdirectory *and* gtm_chset must be set to "UTF-8". If only one is set (one way or the other), you will get the invalid object mismatch error..

        Ah, just noticed in your script above you are exporting "gtmchset" instead of "gtm_chset" .. that would do it.. Hope all works out well for you..

        Steve

         
    • Sean

      Sean - 2007-08-21

      Steve,

      It was an exhausting day yesterday.  It was the gtm_chset export typo that was killing me.  It works great now!

      Thanks,

      Sean

       
  • George James

    George James - 2012-01-10

    Yes, that helped.

    Installing libicu-dev is the only package that is needed now on Debian, however you may still need to configure the en_US.UTF-8 locale if your default locale is not en_US.

    To do this you need to run:
    $ sudo dpkg-reconfigure locales
    and include en_US.UTF-8 in the list of selected locales.

    If you don't do this then you get the following message:
    WARNING: UTF8 locale not found. Not installing Unicode support.
    when running . ./configure to install GT.M

     

Log in to post a comment.