Cannot recognize CJK files name
Need to upgrade to UTF-8 fonts
@qnach Could you elaborate on the problem you encountered? I just discovered that CJK stands for chinese, japanese, korean. Sorry this is totally new to me. What are you trying to do, that does not work as expected?
I am not an experienced programmer in github or linux etc. I just found audivers useful for my purpose and successfully installed. However, I found this program cannot recognize Chinese characters, as shown below
I know it is an issue for coding. Simply change the coding method of all of your program into UTF-8 instead of ASCII or so. UTF-8 is not only for Chinese, Japanese and Korean. Some eastern Europe countries languages also need that.
BTW, I think the error rate is a little bit high. I read your manual up to some 50 pages. I think it is possible to enforce more consistency checks (rules) into the program.
I see. To my knowledge, the program is already configured to use UTF-8. I will double check when I get back to my PC. Stay tuned...
Le mer. 30 juil. 2025, 03:43, 中國醫婊子 @.***> a écrit :
qnach left a comment (Audiveris/audiveris#825) https://github.com/Audiveris/audiveris/issues/825#issuecomment-3134598900
I am not an experienced programmer in github or linux etc. I just found audivers usefult for my purpose and successfully installed. However, I found this program cannot recognize Chinese characters, as shown below image.png (view on web) https://github.com/user-attachments/assets/acacb193-beb9-498e-8692-5a769f3d6046
I know it is an issue for coding. Simply change the coding method of all of your program into UTF-8 instead of ASCII or so. UTF-8 is not only for Chinese, Japanese and Korean. Some eastern Europe countries languages also need that.
— Reply to this email directly, view it on GitHub https://github.com/Audiveris/audiveris/issues/825#issuecomment-3134598900, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFIIGASRGQVLTUHUFPS3IED3LAPKVAVCNFSM6AAAAACCPPZ4HCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCMZUGU4TQOJQGA . You are receiving this because you commented.Message ID: @.***>
@qnach
The items in the menu File | Recent inputs are read from a file, named run.properties.
The path to this file should be:
C:\Users\jltin\AppData\Roaming\AudiverisLtd\audiveris\config\run.properties -------- ^^^ Nota: I inferred this from the image you posted, please check the user name (perhaps it is not 'jltin') because the line was half cropped in your image.
Then check the content of this run.properties file. It is a text file.
Look for the item: org.audiveris.omr.sheet.BookManager.imageHistory which introduces the list of the input file names.
Very important question: Are these file names correct, even those which contain chinese characters?
This will help me resolve your case.
@qnach
I have just published a 5.6.3 pre-release. Here is a direct link in the releases page. Please download and install (after having uninstalled the previous version).
It should now correctly handle the history of file names, even if these file names contain chinese characters. Please check this and post your results.
Beware: this will only work for the NEW file names put in your history, for example by loading an input file. The old file names are still there and corrupted. But this is just a cache for the most recent files. The cache is limited to 10 file names, so the old corrupted names should quickly disappear.
Or, you can immediately purge the cache, by manually editing the run.properties file (see it's precise location in my previous message). Just remove or comment out the line that starts with org.audiveris.omr.sheet.BookManager.imageHistory
No, it is the same
Hmm, I suspect you did not really understand my last message. I said:
Beware: this will only work for the NEW file names put in your history, for example by loading an input file. The old file names are still there and corrupted. But this is just a cache for the most recent files. The cache is limited to 10 file names, so the old corrupted names should quickly disappear.
Comparing your initial image and your recent image of the menu File | Recent inputs, the list of file names is identical in these images!
In other words, you have not modified the file history, which is still corrupted! So, you are reading corrupted items.
Please load files, the same files or new files, but NOT VIA HISTORY.
More precisely use the menu item File | Input and not the menu item File | Recent inputs:
File | Inputadds a new item at the beginning of history (and discards the oldest one at the end). Gradually, your history will get clean.File | Recent inputsreuses (perhaps corrupted) items from history and does not modify/clean it.
o.k. I tried to open a new file
The file name at the bottom screen displayed correctly. But the opening window is still incorrect.
@qnach Remember that, on my side, I cannot test these file names with special characters. So we have to work in parallel, and the good news is that we are making progress. Let's address the problems one by one.
First, the easy ones:
- The file you have loaded contains an image of size 8775 x 12750 = 111,881,250 pixels. This is way above the upper limit of 20,000,000 pixels accepted by Audiveris. Consequently, the program refuses to process this huge file.
- The image represents a score of very poor quality, there is no chance that an OMR program could process such a bad input.
So, for the next tests, please select much smaller files with much better quality.
Second, the handling of chinese characters:
- A good point is the fact that the log window lists the (huge) file with what seems a correct name with chinese characters.
Could you confirm this? - What about the input history? Even though you have not been able to process this huge file, its name should now be in the input history.
Could you check this, by trying the menuFile | Recent inputsand posting the image. - Could you have a look in the
run.propertiesfile with a text editor?
Please post the image. - What puzzles me is your initial Open dialog (your first image). The content it displays for the selected
Youtubefolder, has some (chinese?) characters replaced with blank rectangles. The code for this dialog is not mine, it's a standard Java swing dialog. I will need to investigate how to customize it to make it display chinese characters.
That's all for now.
Reply to your questions:
- Yes, the Chinese characters on the log file and the left top Window screen heading are all correct.
- Input history, as said, is incorrect.
- Cannot find run.properties
- Unrecognized Chinese characters are replaced by squares. It might because you did not use the correct font. The font you used is not Chinese font. We have nowhere to change the font used by the program. Most modern software have a choice to change the language at the option manual, which can even change the heading language. Over there we can change the font too.
Regarding the file run.properties, you are looking at a wrong location:
- Instead of the folder
C:\Program Files\Audiveris\runtime\conf - Look at the folder
C:\Users\jltin\AppData\Roaming\AudiverisLtd\audiveris\config
The Chinese characters displayed correctly, if I use a text editor that can read Chinese. Apparently, it is the font used. Need somehow to Change the font.
Yes, the content of run.properties file is correct.
The problem is that some parts of Audiveris graphic interface (like the list of recent input files) don't display the chinese characters correctly, while some other parts are OK (like the frame title or the log window).
I'm still investigating.
it is the font, as i said
I think not, the default font is Arial
- Arial font do not have Chinese character.
- there is a font called windows system font, which is whatever font is used in your window system to display.
@qnach You are right, Arial font does not provide Chinese characters. My mistake!
I have made a test, manually changing the name of a file, so that the name contains Chinese characters. Doing so, I have been able to observe how Audiveris displays information regarding this file. I got results similar to yours (correct displays here, non correct displays there).
Then I changed the defaultFontName constant (defined in UIUtil class) from Arial to each of the Java "Logical" fonts:
- Dialog
- DialogInput
- Monospaced
- Serif
- SansSerif
For all these 5 logical fonts, the results are now correct. Here below is the result with the "Dialog" font.
So, I propose to permanently replace "Arial" by "Dialog" in the UIUtil class.
Knowing that any user can change the defaultFontName constant via the menu Tools | Constants
@qnach
We can change the default Locale in Audiveris, via the Tools | Preferences menu.
Today, the choice is between "en" (the default), and "fr".
But this is different from the question of font. It allows to customize the language in which Audiveris messages are shown.
This is done via a set of .properties files located in the resources folders.
There are today 33 such files per language in Audiveris application.
For instance, the Java class AboutAction, which displays the "About" information provides, in the sibling resources folder:
AboutAction.propertiesfor the default (English) language,AboutAction_fr.propertiesfor the fr (French) language.
If someone volunteers to support the Chinese language, all this person has to do is to provide a proper:
AboutAction_zh.propertiesfile.
And do the same thing for the other 32 files...
FYI, here is the content of AboutAction.properties:
# ---------------------------------------------------------------------------- #
# #
# A b o u t A c t i o n . p r o p e r t i e s #
# #
# ---------------------------------------------------------------------------- #
# This file gathers resources to be injected in the AboutAction class
#
# This is the generic version
# Resources for AboutBox
# ----------------------
AboutDialog.title = About ${Application.name}
AboutDialog.copied = Content copied to clipboard!
aboutTitleLabel.text = ${Application.name}
descriptionLabel.text = Role:
descriptionTextField.text = ${Application.description}
versionLabel.text = Version:
classesLabel.text = Container:
homeLabel.text = Home page:
projectLabel.text = Dev. project:
licenseLabel.text = Software license:
ocrLabel.text = OCR engine:
ocrFolderLabel.text = OCR folder:
javaVendorLabel.text = Java vendor:
javaVersionLabel.text = Java version:
javaRuntimeLabel.text = Java runtime:
javaVmLabel.text = Java VM:
osLabel.text = Operating System:
osArchLabel.text = Architecture:
And the content of AboutAction_fr.properties:
# ---------------------------------------------------------------------------- #
# #
# A b o u t A c t i o n _ f r . p r o p e r t i e s #
# #
# ---------------------------------------------------------------------------- #
# This file gathers resources to be injected in the AboutAction class
#
# This is the "fr" version
# Resources for AboutBox
# ----------------------
AboutDialog.title = A propos d'${Application.name}
AboutDialog.copied = Contenu copi\u00e9 dans le presse-papiers !
descriptionLabel.text = R\u00f4le :
versionLabel.text = Version :
classesLabel.text = Conteneur:
homeLabel.text = Site Web :
projectLabel.text = Projet :
licenseLabel.text = Licence du logiciel :
ocrLabel.text = Moteur OCR :
ocrFolderLabel.text = Donn\u00e9es OCR :
javaVendorLabel.text = Fournisseur Java :
javaVersionLabel.text = Version Java :
javaRuntimeLabel.text = Runtime java :
javaVmLabel.text = Machine virtuelle Java :
osLabel.text = Syst\u00e8me d'exploitation :
osArchLabel.text = Architecture :