UTF-8 problem with syncthing in Opi PC driving me crazy

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

UTF-8 problem with syncthing in Opi PC driving me crazy

Post by Sciamano »

Hi!
I have just added a new machine to my network (a new Orange Pi PC). After installing dietpi, I have immediately installed syncthing and shared the same directory I've been sharing for months between the other nodes.

But on this machine syncthing keeps sending errors like these whenever it encounters a filename with special characters (like à,è,ì and other accented characters which are pretty common in italian):

Code: Select all

2017-01-26 22:55:27: File name "Shared/Articoli/Africa/Northern Africa/Morocco/Chefchaouen/JPEG/escalier-bleu-by-jean-fran\xe7ois-gornet.jpg" is not in UTF8 encoding; skipping.

2017-01-26 22:55:28: File name "Shared/Articoli/Europe/Western Europe/France/Annecy/Vladimir Tkalcic\x87 - Annecy.jpg" is not in UTF8 encoding; skipping.
The same files have always synced correctly on the other machines (even on another Opi PC running DietPi!).
Any idea what might be the problem on this?

locale is correct:

Code: Select all

root@OPiHome:~# locale
LANG=en_GB.UTF-8
LANGUAGE=
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
I tried reinstalling syncthing, but it did not solve the problem.

Any ideas? This is driving me crazy
Thanks
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: UTF-8 problem with syncthing in Opi PC driving me crazy

Post by Fourdee »

Sciamano wrote:After installing dietpi, I have immediately installed syncthing and shared the same directory I've been sharing for months between the other nodes.
Are the other nodes running the same version of syncthing? Just wondering if they have changed how they manage UTF-8 files in latest version?
But on this machine syncthing keeps sending errors like these whenever it encounters a filename with special characters (like à,è,ì and other accented characters which are pretty common in italian):
It may be worth adding additional locales, see if Syncthing plays ball.

dietpi-config > Language/Regional Options > Locale

Then add/select:

Code: Select all

en_GB ISO-8859-1
en_GB.ISO-8859-15 ISO-8859-15
Select en_GB.UTF-8 as default

Reboot and see if same issue appears.

Failing that, try changing the default locale to en_GB ISO-8859-1 or en_GB.ISO-8859-15 ISO-8859-15
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: UTF-8 problem with syncthing in Opi PC driving me crazy

Post by Sciamano »

Fourdee wrote: Are the other nodes running the same version of syncthing? Just wondering if they have changed how they manage UTF-8 files in latest version?
Yes, same version on every node (v0.14.21)
Failing that, try changing the default locale to en_GB ISO-8859-1 or en_GB.ISO-8859-15 ISO-8859-15
Tried both solutions, nothing changed.
When I add a file on an "older" node, named "àààà.txt", it will be synced as "àààà.txt" (with a space after each character) on the new OPi. :?
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: UTF-8 problem with syncthing in Opi PC driving me crazy

Post by Sciamano »

Yeah!! I finally solved it!

The directory to be synced is hosted on a NAS which is mounted on the OPi via Samba.
In the fstab, the "iocharset=utf8" option was missing. Adding this solved the problem.

Geez... can you believe it? That stupid little missing string drove me crazy!
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: UTF-8 problem with syncthing in Opi PC driving me crazy

Post by Fourdee »

Sciamano wrote:Yeah!! I finally solved it!

In the fstab, the "iocharset=utf8" option was missing. Adding this solved the problem.

Geez... can you believe it? That stupid little missing string drove me crazy!
Nice one! :)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: UTF-8 problem with syncthing in Opi PC driving me crazy

Post by Sciamano »

The strange thing is that on the Raspberry Pi the same fstab (without iocharset) works perfectly! :shock:
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: UTF-8 problem with syncthing in Opi PC driving me crazy

Post by Fourdee »

Sciamano wrote:The strange thing is that on the Raspberry Pi the same fstab (without iocharset) works perfectly! :shock:
Only reason I can think of is, possibly iocharset=utf8 is a default option in 4.4 kernel that RPi uses.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: UTF-8 problem with syncthing in Opi PC driving me crazy

Post by Sciamano »

That might be it. Only thing I know is that the same fstab worked on the RPi. 8-)
Tomorrow I'm going to check the fstab of my other Orange Pi (that I keep at work) to see whether it contains the iocharset setting, because that installation has never given any errors.
Post Reply