B4A Code Snippet [B4X] Reading a UTF 8 file that might have BOM - Erel    Mar 22, 2018   (16 reactions) UTF8 text files might include a BOM character. You can test it by using a decent text editor such as Notepad++.
Always prefer to work with text files encoded with UTF8 without BOM.
This code reads a UTF8 text file and removes the BOM character if needed:
Sub ReadUTF8FileMaybeWithBOM (Dir As Strin B4A Question File name with a space - emexes (first post)    Sep 27, 2022   (1 reaction) 65279 = 0xFEFF = Unicode BOM (byte order mark) which I vaguely remember is added by Windows Notepad (and presumably other editors) at the beginning of files saved as Unicode (or perhaps only 16-bit and 32-bit Unicode - UTF-8 is pretty clear on byte order). https://en.wikipedia.org/wiki/Byte_order_ Share My Creation eBreathalyzer : wifi enabled cheap eBAC sensor - freedom2000    Dec 05, 2015   (20 reactions) Hi all, Again a small IoT device showing clearly all the power of ESP8266 chip and B4A. It's just a MQ-3 gaz sensor UDP connected to my Android. A little calibration, a nice gauge and that's it See it in action ! HszjyjVeMz0 and remember... BoM is less than 20$ :) I have just received Pcbs fr B4A Question Immediate app crash when using firebase admob with androidX SDK - DonManfred (first post)    Jul 07, 2020 bom is not a Library. You should not install/download it at all. B4A Question How to find out which library is giving an error? - DonManfred (first post)    Nov 09, 2021 firebase-bom-29.0.0.pom has no jar belong to. You dont need the bom B4A Question loadCSV adding "ZERO WIDTH NO-BREAK SPACE" with the unicode 65279 to the beginning of the string - emexes (first post)    Mar 05, 2024   (1 reaction) That is a good question. I don't have Excel, only OpenOffice Calc, which doesn't show any option about whether to include BOM or not. 151478 I saved anyway, and the resulting csv file did not have BOM. B4A Question httputils2 strange behavour - jayel (first post)    Mar 17, 2015   (1 reaction) Hello, Just to avoid that somebody else has the same issue. The 3 characters in the beginning are ascii = 65279 These are BOM characters. I was using a php extension for visual studio to write my php code, now it seems that when you use include or require it put a BOM character. When I use Notepad+ B4A Question Problem using Okhttputils2 with Android 10 - Erel (first post)    Dec 16, 2019 This is the UTF8 BOM marking. C/C++ Question ESPAlexa a library to control ESP via Alexa. Is there a way to port this library to B4R? - thetahsk (first post)    Aug 02, 2022 This looks like an encoding problem. Remove the BOM identifier ( Byte Order Mark) from your source codes. ( see details: https://en.wikipedia.org/wiki/Byte_order_mark) If you use Notepad++, convert all your files to UTF-8 (without BOM) and save them. I checked the original archieve from https://gith B4A Question httpjob getString method - DonManfred (first post)    Sep 05, 2016 So the result is different cause of the BOM Page: 1   2   3   4   5   6   7   Powered by ColBERT |