JLinkExe does not support file names with UTF-8 letters

  • Hello.

    Configuration:

    • operating system = Linux Ubuntu 20.04
    • JLink software Debian package v8.38 (64 bits)
    • JLinkExe = SEGGER J-Link Commander V8.38 (Compiled May 28 2025 12:46:55)
    • device = J-Link Base (running J-Link V11 compiled Apr 1 2025 10:02:30)

    It looks like the "JLinkExe" binary is not able to read command input encoded in UTF-8.
    I need to load a .hex file named for example "file_with_utf8_é.hex".
    Note the "é" letter in the file name, which is very common in my language.

    Running JLinkExe, when I manually try to type on my keyboard the command "loadfile file_with_utf8_é.hex"
    I can not enter the "é" letter (my key stroke is just ignored by JLinkExe), and therefore I can not enter the correct file name.
    I have a dedicated "é" key on my keyboard, and pressing that key is ignored by JLinkExe.

    Actually this issue was discovered when using a bash shell script used by our factory to automatize loading first firmware to MCU embedded flash.
    The .hex file name is generated and may have UTF-8 letters in its name.
    So it's not possible for us to simply avoid such letters.

    For your information, here is this bash script :


    If I run this script with "./flash.sh file_with_utf8_é.hex", then JLinkExe shows "Downloading file [file_with_utf8_.hex]..." (note the missing "é" letter) and fails with error "Failed to open file".
    If I rename the file to "file_with_no_utf8.hex"' and run "./flash.sh file_with_no_utf8.hex", then no error occurs.

  • Hello,

    The J-Link Commander currently supports only ANSI-encoded strings for file names.

    However, you can flash files with UTF-8 encoding using J-Flash:

    1. Create a J-Flash project for your target.
    2. Flash your data file using the J-Flash CLI options.
      Example:
      JFlash.exe -openprj "stm32f407ve.jflash" -open "HSS_Example_é.hex" -auto -exit

    For more details on J-Flash CLI options, please refer to:
    J-Flash Command Line Interface

    Let me know if this works for you or if you need assistance setting up the project.

    Best regards,
    Simon

    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!