[Solved] Charachter encodig of folder names

Posted:
Tue Jan 19, 2016 7:38 pm
by nik_ola
I am usuin Serviio 1.6 on Ubuntu 14.04.3 LTS with russian locale
I can't add any folder to share because of bad charachter encodig of folder names.

Here is log file
- Code:
2016-01-19 22:15:09,787 WARN [ServiioStatusService] FileNotFoundException occured. Returning error code 404 to the REST layer. Message: '/home/noya/????????????' is not an existing folder or is not readable for the current user
2016-01-19 22:18:14,478 WARN [ServiioStatusService] FileNotFoundException occured. Returning error code 404 to the REST layer. Message: '/home/noya/????????????' is not an existing folder or is not readable for the current user
How can I sovle it? with servio 1.4.2 there was no problem.
Re: Charachter encodig of folder names

Posted:
Tue Jan 19, 2016 9:21 pm
by zip
What is your OS locale / character encoding exactly?
Try to pass this as a system variable in serviio.sh
- Code:
-Dfile.encoding=your_encoding
your_encoding might be 'Cp1251' or 'windows-1251' (I'm guessing), according to this page:
https://docs.oracle.com/javase/8/docs/t ... g.doc.html
Re: Charachter encodig of folder names

Posted:
Wed Jan 20, 2016 10:43 am
by nik_ola
What is your OS locale / character encoding exactly?
- Code:
LANG=ru_RU.UTF-8
LANGUAGE=ru
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=
Try to pass this as a system variable in serviio.sh
- Code:
-Dfile.encoding=your_encoding
I tryed, but no changes
- Code:
#!/bin/sh
### ====================================================================== ###
## ##
## Serviio start Script ##
## ##
### ====================================================================== ###
DIRNAME=`dirname "$0"`
PROGNAME=`basename "$0"`
-Dfile.encoding=windows-1251
...
Also tryed "-Dfile.encoding=Cp1251" and utf8
Am I doing right?
Re: Charachter encodig of folder names

Posted:
Wed Jan 20, 2016 1:35 pm
by zip
No, you have to add the -D parameter next to the other -D parameters.. further down. Add it at the end of JAVA_OPTS
Also try this:
viewtopic.php?f=5&t=6910&p=56019#p56019Or this:
viewtopic.php?f=5&t=9327
Re: Charachter encodig of folder names

Posted:
Wed Jan 20, 2016 9:01 pm
by nik_ola
I have tried to add the import languge line in the /opt/serviio/bin/serviio.sh according to:
http://wiki.serviio.org/doku.php?id=install_qnap (step 15) LANG=ru_RU.UTF-8. It works! Thank you.
Re: [Solved] Charachter encodig of folder names

Posted:
Fri Nov 11, 2016 8:48 pm
by _via_
I have the same issues and no one of things above does not help me.
My configuration:
# cat /etc/os-release
NAME="Ubuntu"
VERSION="12.04.5 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.5 LTS)"
VERSION_ID="12.04"
# java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
serviio version - 1.7.1.1
I use UTF-8 encoding.
I made some tests and got next results:
I'm unable to open folder in serviio-console (running on windows 8 host) when folders structure looks like this:
# ls -alF /data/movies/Абвг/
total 12
drwxr-xr-x 3 root root 4096 Nov 11 23:33 ./
drwxr-xr-x 9 ilya ilya 4096 Nov 11 01:23 ../
drwxr-xr-x 2 root root 4096 Nov 11 01:31 HHI 2015/
The third subfolder contains national symbols.
In serviio.log I got error:
2016-11-11 23:34:27,997 WARN [ServiioStatusService] FileNotFoundException occured. Returning error code 404 to the REST layer. Message: '/data/movies/Ð<U+0090>бвг' is not an existing folder or is not readable for the current user
2016-11-11 23:34:27,997 DEBUG [ServiioStatusService] Detailed exception:
java.io.FileNotFoundException: '/data/movies/Ð<U+0090>бвг' is not an existing folder or is not readable for the current user
at org.serviio.ui.resources.server.BrowseFileSystemServerResource.loadFolders(BrowseFileSystemServerResource.java:75)
at org.serviio.ui.resources.server.BrowseFileSystemServerResource.getFoldersForDirectory(BrowseFileSystemServerResource.java:54)
at org.serviio.ui.resources.server.BrowseFileSystemServerResource.listFolders(BrowseFileSystemServerResource.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
... <skip>
But when I remove subfolder "HHI 2015" and move files into /data/movies/Абвг/, I have no problems:
# ls -alF /data/movies/Абвг/
total 133280
drwxr-xr-x 2 root root 4096 Nov 11 23:44 ./
drwxr-xr-x 9 ilya ilya 4096 Nov 11 01:23 ../
-rwxr--r-- 1 root root 136469151 Nov 11 23:44 01 Hip Hop International 's 2015 Highlights!.mp4*
From serviio.log:
2016-11-11 23:46:05,372 DEBUG [MediaFileIndexer] Found file '01 Hip Hop International 's 2015 Highlights!.mp4', checking if it's already in the Library
2016-11-11 23:46:05,372 DEBUG [MediaItemDAOImpl] Checking if DB already contains media item /data/movies/Абвг/01 Hip Hop International 's 2015 Highlights!.mp4