Unable to open pdf files which has cyrilic characters in its name


**Description of the issue: ** Unable to open pdf files which has cyrilic characters in its name
How can this issue be reproduced?

  1. You need to have a pdf file which has cyrilic characters in its name on your PC.
  2. Try to open this file with Brave browser.
  3. You get to file:/// page instead of pdf being open

Expected result: pdf file being open in Brave browser.

Brave Version( check About Brave):
Version 1.46.144 Chromium: 108.0.5359.128 (Official Build) (64-bit)

Additional Information:
If pdf gets renamed so there would not be any cyrilic characters in its name, it then opens perfectly fine in Brave browser
Specs:
Operating System: Arch Linux
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.11-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-9300H CPU @ 2.40GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Manufacturer: Micro-Star International Co., Ltd.
Product Name: GF63 Thin 9SCXR
System Version: REV:1.0

Hello @EdmundJK

could you try to update brave and see if it work fine or not

the current version is
Version 1.48.158 Chromium: 110.0.5481.77 (Official Build) (64-bit)

by the way if you open pdf with your any pdf app you have does it work fine with the cyrlic file name?

so i updated to v1.48.158 (Feb 7, 2023) (could not update to the latest one since it is not in AUR yet) and it didn`t help
Also tried Brave browser Beta v1.49.99-1 and Brave browser Nightly v1.50.38-1 and both of them have the same exact behavior as standard Brave browser.
I can open those pdf files perfectly fine with any other software (libre office draw, by example)

could you disable all extension and try in private mode ? if it work then enable extension one by one till you find the one causing the issue

if that did not work could you try to create new profile and see if it work there

hope one of those help and have a nice day :slight_smile:

i am unable to choose if i want to open pdf in a private mode or not when using “open with → Brave” menu option, so i dont see how i can try that, thou i am able to open a pdf file via drag & dropping it in a already open private session and it actually works fine but it also works in a normal session too, the issue occurs only when opening the file the usual way (double clicking if brave is the default option or right clicking and selecting the program to open it with), not when drag & dropping into open brave window
i also checked how it works with a new profile and got exactly the same behavior
honestly, i don`t think there can be an issue with my local extensions or settings since, as i wrote in the previous post, i tried doing it in Brave beta and Brave Nightly where i had all the default settings and no extensions, and it worked the same way as in my main browser

sorry i missed it

i tried to use some cyrillic letters with pdf and it work fine but i use rocky linux 9.1

so not sure if it related to some letters or not

or there some other issue related to your linux user account

so could you give me sample of cyrilic letters that has issue with you even one letter would be enough

and could you also try to create new linux user and see if it work fine there or not?

Surprisingly it works fine with new linux user, i tested it with the same exact files and there is no problem.
btw i noticed that the files that i am not able to open also does not show up in brave when using it as files manager (basicly typing something like “file:///home/username/…” in address field), you can see that the files are there (as it shows their date of edit) but in does not show their names. no such problem with new linux user also.
so it must be some setting in kde or smth that breakes it but i can`t really tell what that might be

unfortunatly i can not tell also what is the cause as you said file open with other apps and it does not work with beta version which is isolated from release version setting

i could check with setting of the old user that related to keyboard and encoding and maybe the locale but it just a guessing from me

and have a nice day :slight_smile:

so i found the solution. uncommenting all lines that start with “ru_RU” in /etc/locale.gen and rebooting made it work
weird that i only encountered it in Brave and that it works fine with a new linux user (who does not have those locale setting setup)
Thanks for your help!

2 Likes

thanks @EdmundJK for sharing your solution

this what i found about the locale

https://wiki.archlinux.org/title/Locale

from the link it said that this locale setting affect the glibc and any locale aware app

and in the note it said

locale-gen also runs with every update of glibc. [1] UTF-8 is recommended over other character sets. [2]

so maybe one of your system update to glibc run locale-gen which create this locale for old use but since the new user did not get any update yet so it not created

Edit: i forget to mention that it better to use UTF-8

thanks again for sharing that and letting me learn new things

and have a nice day :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.