Directory Studio
  1. Directory Studio
  2. DIRSTUDIO-904

Directory Studio create files with french "accents"

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M6 (2.0.0.v20130308)
    • Component/s: studio-apacheds
    • Labels:
      None
    • Environment:

      Description

      Start directory studio and try to start the default server.
      La configuration de lancement Démarrage du serveur apacheds... sur file:/Users/olamy/.ApacheDirectoryStudio/.metadata/.plugins/org.eclipse.debug.core/.launches/Démarrage%20du%20serveur%20apacheds....launch n'existe pas.
      [28/04/13 23:01:35] Olivier Lamy: ls -lrt /Users/olamy/.ApacheDirectoryStudio/.metadata/.plugins/org.eclipse.debug.core/.launches/
      total 24
      rw-rr-  1 olamy  staff  3426 28 avr 22:55 D?marrage du serveur ApacheDS 2.0.0....launch
      rw-rr-  1 olamy  staff  3425 28 avr 22:55 D?marrage du serveur ApacheDS2.0.0....launch
      rw-rr-  1 olamy  staff  3420 28 avr 23:01 D?marrage du serveur apacheds....launch

      ls -lrt /Users/olamy/.ApacheDirectoryStudio/.metadata/.plugins/org.eclipse.debug.core/.launches/
      total 24
      rw-rr- 1 olamy staff 3426 28 avr 22:55 D?marrage du serveur ApacheDS 2.0.0....launch
      rw-rr- 1 olamy staff 3425 28 avr 22:55 D?marrage du serveur ApacheDS2.0.0....launch
      rw-rr- 1 olamy staff 3420 28 avr 23:02 D?marrage du serveur apacheds....launch

        Activity

        Hide
        Emmanuel Lecharny added a comment -

        There is most certainly an encoding issue. However, I guess that the file name is created using a resource message, which is really not a good idea.

        Show
        Emmanuel Lecharny added a comment - There is most certainly an encoding issue. However, I guess that the file name is created using a resource message, which is really not a good idea.
        Hide
        Emmanuel Lecharny added a comment -

        Here is the line where we associate the server's name :

        ApacheDS200LdapServerAdapter.java, line 206 :
        ...
        ILaunchConfigurationWorkingCopy workingCopy = type.newInstance( null,
        NLS.bind( Messages.getString( "ApacheDS200LdapServerAdapter.Starting" ), new String[] //$NON-NLS-1$

        { server.getName() } ) );

        Something like :
        ...
        ILaunchConfigurationWorkingCopy workingCopy = type.newInstance( null,
        NLS.bind( "Starting {0}", new String[] //$NON-NLS-1$
        { server.getName() }

        ) );

        would be more appropriate, IMHO.

        Show
        Emmanuel Lecharny added a comment - Here is the line where we associate the server's name : ApacheDS200LdapServerAdapter.java, line 206 : ... ILaunchConfigurationWorkingCopy workingCopy = type.newInstance( null, NLS.bind( Messages.getString( "ApacheDS200LdapServerAdapter.Starting" ), new String[] //$NON-NLS-1$ { server.getName() } ) ); Something like : ... ILaunchConfigurationWorkingCopy workingCopy = type.newInstance( null, NLS.bind( "Starting {0}", new String[] //$NON-NLS-1$ { server.getName() } ) ); would be more appropriate, IMHO.
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        Yup to get it working I changed locale to

        mb-olamy:tgtesb olamy$ locale
        LANG="en_AU.UTF-8"
        LC_COLLATE="en_AU.UTF-8"
        LC_CTYPE="en_AU.UTF-8"
        LC_MESSAGES="en_AU.UTF-8"
        LC_MONETARY="en_AU.UTF-8"
        LC_NUMERIC="en_AU.UTF-8"
        LC_TIME="en_AU.UTF-8"
        LC_ALL=
        

        And now it Roxxx

        Show
        Olivier Lamy (*$^¨%`£) added a comment - Yup to get it working I changed locale to mb-olamy:tgtesb olamy$ locale LANG= "en_AU.UTF-8" LC_COLLATE= "en_AU.UTF-8" LC_CTYPE= "en_AU.UTF-8" LC_MESSAGES= "en_AU.UTF-8" LC_MONETARY= "en_AU.UTF-8" LC_NUMERIC= "en_AU.UTF-8" LC_TIME= "en_AU.UTF-8" LC_ALL= And now it Roxxx
        Hide
        Pierre-Arnaud Marcelot added a comment -

        Hi Olivier,

        Did you get an error of some sort while starting the server?
        Because I just changed my locale to "Français" here on my Mac and, indeed it creates a file with accents, but I was perfectly able to start the server.

        At first, I thought the name we give to the launch configuration was to be presented to the user at some point, hence the need for internationalization. But, I just double-checked and it turns out it seems not to be the case.
        So it should be ok to move the name of the launch configuration to something unique in plain US English.
        Maybe it would also be safer not to use the name of the server (which could contain special characters) but rather use the ID.

        I'll have a look into that.

        Show
        Pierre-Arnaud Marcelot added a comment - Hi Olivier, Did you get an error of some sort while starting the server? Because I just changed my locale to "Français" here on my Mac and, indeed it creates a file with accents, but I was perfectly able to start the server. At first, I thought the name we give to the launch configuration was to be presented to the user at some point, hence the need for internationalization. But, I just double-checked and it turns out it seems not to be the case. So it should be ok to move the name of the launch configuration to something unique in plain US English. Maybe it would also be safer not to use the name of the server (which could contain special characters) but rather use the ID. I'll have a look into that.
        Hide
        Pierre-Arnaud Marcelot added a comment -

        Fixed at revision 1477154.

        http://svn.apache.org/r1477154

        Show
        Pierre-Arnaud Marcelot added a comment - Fixed at revision 1477154. http://svn.apache.org/r1477154
        Hide
        Pierre-Arnaud Marcelot added a comment -

        I actually only used the ID of the server for the name of the launch configuration.
        It should not cause any issues now...

        $ ll /Users/pajbam/Development/Apache/runtime-Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches
        total 48
        rw-rr- 1 pajbam staff 18658 29 avr 17:37 3559ad41-5c24-486e-a316-a494a12a5e0d.launch
        rw-rr- 1 pajbam staff 3501 29 avr 17:37 b005d91c-6291-459f-bc13-5443ada51098.launch

        Show
        Pierre-Arnaud Marcelot added a comment - I actually only used the ID of the server for the name of the launch configuration. It should not cause any issues now... $ ll /Users/pajbam/Development/Apache/runtime-Eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches total 48 rw-r r - 1 pajbam staff 18658 29 avr 17:37 3559ad41-5c24-486e-a316-a494a12a5e0d.launch rw-r r - 1 pajbam staff 3501 29 avr 17:37 b005d91c-6291-459f-bc13-5443ada51098.launch
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        not sure about the human readability but looks better
        Thanks Mate !

        Show
        Olivier Lamy (*$^¨%`£) added a comment - not sure about the human readability but looks better Thanks Mate !

          People

          • Assignee:
            Pierre-Arnaud Marcelot
            Reporter:
            Olivier Lamy (*$^¨%`£)
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development