Android Question Error compiling in Release: Filenames with accents and other characters (ç) in Assets

Discussion in 'Android Questions' started by inakigarm, Jun 11, 2019.

Similar threads

B4A Code Snippet [B4X] Bytes To File
B4A Library Printing and Pdf creation
B4A Code Snippet Remove accents from string
B4J Tutorial [B4X] FontAwesome & Material Icons fonts
B4A Code Snippet Upload files with WebView
  1. inakigarm

    inakigarm Well-Known Member Licensed User

    When compiling in Debug mode, I'm able to run the compiled program in device (via B4A-Bridge). The program copies from DirAssets to DirInternal several graphic files with accents and other characters (like ç) on their filenames.

    But when compiling in Release mode, this error arises:

    upload_2019-6-11_16-57-27.png

    It seems that even Android permits this characters (UTF-8) in filenames, but Windows is encoding the filename in another encoding system (find this on https://conexionesrazonables.blogspot.com/2012/04/realizando-una-aplicacion-para-android.html, in english at page bottom)

    Looking at data\android\'appname'\files I can see this files with this characters, so the files are installed at least once (don't know if it was at Debug or in a Release compilation)

    Any workaround different than rename all the files (and change also the sqlite DB registers)?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Try to zip the files and unzip the archive when your program starts (only need to do it once).
     
  3. inakigarm

    inakigarm Well-Known Member Licensed User

    Ok.
    Only for knowlege, why it works on Debug and not on Release ? (I've my theories but I'd like to know the real reason)
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    The files are not packed inside the APK file (with AAPT tool) in debug mode. They are sent over the network when needed. This allows the IDE to update files and layouts without making a full compilation.
     
    inakigarm likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice