#87 Problem of accentuation

open
nobody
None
5
2016-11-05
2011-09-11
Lex_Luthor
No

MiniDLNA v. 1.0.22 (20110825)
Ubuntu 10.04.3 Lucid

The problem is that MiniDLNA can not display accents on letters such as :
Video in English --> in French is Vidéo --> with MiniDLNA is Vid?o
Action Carried in English --> in French is Action Réalisée --> with MiniDLNA is Action R?alis?e

The é are replaced by ? --> See the Log File

In French, accents are :
é, è, ê, à, â, ù, î, ô

The traduction in French is bad

Discussion

  • Lex_Luthor

    Lex_Luthor - 2011-09-11

    Log MiniDLNA (French)

     
  • Justin Maggard

    Justin Maggard - 2011-09-14

    I think you must be using old gettext translation data, from more than 3 months ago. Try rebuilding it with msgfmt from the latest CVS.

     
  • Thomas Parquier

    Thomas Parquier - 2014-05-11

    Still have problem with minidlna 1.1.2, on crunchbang :
    Distributor ID: Debian
    Description: Debian GNU/Linux testing (jessie)
    Release: testing
    Codename: jessie

    No problem with folders and videos, but apparently with default "folders" such as "Vidéo" at root level and "Toutes les vidéos" (all videos) just below.

     
  • Hubert Toullec

    Hubert Toullec - 2015-10-17

    Problem still pending on minidlna 1.1.5 (running on ARM Archlinux).
    Translation is Ok in minidlna.mo, so maybe a bad decoding in source code ...?

     
  • Shrimpkin

    Shrimpkin - 2015-11-16

    @hutou - I've tested this and came across bad translations once but haven't been able to reproduce it. Most likely the problem is in locales configuration or gettext, not in minidlna. Double check your TEXTDOMAINDIR is pointing to correct locales directory and recompile from source.

    @jmaggard - The DPRINTF in minidlna.c:init_nls() will always fail to log. Set to E_OFF, E_WARN, or run init_nls() after log_init().

     
  • Justin Maggard

    Justin Maggard - 2015-11-16

    Thanks for pointing that out. I'll move the init_nls() call.

     
  • Hubert Toullec

    Hubert Toullec - 2015-11-17

    Hi,
    I took some time to investigate the problem, and found that replacing the lines
    setlocale(LC_MESSAGES, "");
    setlocale(LC_CTYPE, "en_US.utf8");
    by a mere
    setlocale(LC_ALL, "");
    in the file minidlna.c did solve the problem for me.

    Just remain the 3 "Recently added" strings in the containers.c file, which can be translated in french by "Ajouts récents". I added this string in the po/fr.po file, but couldn't manage to get the gettext() function to work in the containers.c file (my C skill is rather low, however ;-)

    So, I hard coded the french translation in the containers.c file, and after recompilation, all accents are rendered correctly.

     
    Last edit: Hubert Toullec 2015-11-17
  • Shrimpkin

    Shrimpkin - 2015-11-18

    Thanks for posting. Now I know why I couldn't reproduce the issue as I never removed the en_US.UTF-8 locale.

    As a simple workaround, you could just include en_US.UTF-8 in your locales list and generate the locales.

    According to the setlocale man page, setting LC_ALL to an empty string is one step in portable code. 'man setlocale' for more info. I do not know if there is a reason for the hardcoded LC_CTYPE.

    Here is a concept patch on using gettext with "Recently Added" strings. Should work but I didn't test much.

     
  • Hubert Toullec

    Hubert Toullec - 2015-11-19

    Your patch works perfectly for the "Recently Added" strings translation, but it does not include the setlocale(LC_ALL,"") to deal with default folders names translation.

     
  • Justin Maggard

    Justin Maggard - 2015-11-20

    IIRC, lots of things break if the system locale is not UTF-8, so I hard-coded it to the most commonly installed UTF-8 locale. Please see if this patch works for you. It adds a fallback in case en_US is not present.

     
  • Hubert Toullec

    Hubert Toullec - 2015-11-20

    Your last patch does work for me (I use Archlinux, and my locale is set to "fr_FR.UTF-8")
    Thanks

     
  • Shrimpkin

    Shrimpkin - 2015-11-23

    @hutou - Only LC_CTYPE needs to be set for handling multibyte characters.

    @jmaggard - Thanks for clarifying. I would suggest adding a DPRINTF warning if another locale is being used that is not UTF8 or if no locale was set.

     
  • Nicolas

    Nicolas - 2015-12-09

    Hello,
    how to apply the patch , what is the command?

    thank you very much.
    Nicolas

     
  • Shrimpkin

    Shrimpkin - 2015-12-12

    Use the patch command. 'man patch' for more info. Ex:

    patch -p1 < filename.patch
    

    Here is a "wrap up" patch that adds a few debugging comments including additional translations using an online translation service. Translations may be wrong and have not throughly tested.

     
  • NeoCrazydoub

    NeoCrazydoub - 2016-11-04

    HI dear friends...
    I'm a windows user and a reallu big nood with linux/debian/...
    I extract this subject from the grave ;)
    I setted up a full server on a PI with owncloud, samba and minidlna with cronjobs which changed my life but i only have a last problem which i can't solve and (this one).
    All accent return "?" to dlna clients...

    My version:

    minidlna:
      Installé : 1.1.2+dfsg-1.1+b1
      Candidat : 1.1.2+dfsg-1.1+b1
     Table de version :
     *** 1.1.2+dfsg-1.1+b1 0
            500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
            100 /var/lib/dpkg/status
    

    I've read the post and saw that there's a patch but i really don't know whic file must be patched and how and where mus i put the patch to do this...
    Could you lpease help me.

     
  • Shrimpkin

    Shrimpkin - 2016-11-05

    Use a recent version of minidlna.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks