Current version of B4J is 6.30, so you are a bit behind.... JStringUtils, if I remember correctly, is part of the core libs... so with the latest IDE all core kind are uptodate
Current version of B4J is 6.30, so you are a bit behind.... JStringUtils, if I remember correctly, is part of the core libs... so with the latest IDE all core kind are uptodate
How to save csv as ANSI (windows-874 , iso-8859-11 , tis-620)
I try like this ( B4J).
B4X:
su.SaveCSV2(File.DirApp, fileName, ",", Items, headers)
Dim s As String = File.ReadString(File.DirApp, fileName)
Dim data() As Byte = s.GetBytes("windows-874") ' and I also try iso-8859-11 , tis-620
s= BytesToString(data,0,data.Length,"windows-874")
's = Chr(0xFEFF) & s 'Add BOM
File.WriteString(File.DirApp, fileName, s)
File.WriteString uses UTF8 encoding to encode the text.
B4X:
Dim data() As Byte = ...
File.WriteBytes(File.DirApp, filename, data) 'Don't use File.DirApp if you plan to create an installer. Use File.DirData instead
Another option is to use TextWriter. File.WriteBytes is neater.
File.WriteString uses UTF8 encoding to encode the text.
B4X:
Dim data() As Byte = ...
File.WriteBytes(File.DirApp, filename, data) 'Don't use File.DirApp if you plan to create an installer. Use File.DirData instead
Another option is to use TextWriter. File.WriteBytes is neater.