M
Matt Baker
Guest
Can you translate everything through UTF-8, or even UTF-16? I would thinking using UTF-? for a consistent “external” (files and streams; read: bytes instead of strings) should get you a long way there. UTF-8 is very compatible, near universal, and there are conversion tables for it, to/from many other code pages in .NET, ABL, and Java. We ran into pretty much this same with Visual Designer in PDSOE. Visual designer use TCP socket between the AVM hosting the .NET stuff and the PDSOE java process, so any data that needs to go between the text editor and the .NET GUI has to be converted from strings/numbers to bytes. .NET uses UTF-16BE internally, but supports both UTF-16LE and UTF-16BE; but in java everything is UTF-16LE internally for strings. We needed some transfer that could handle any file encoding supported by java for .cls files. We ended up reading whatever format the editor claimed was the file encoding (usually that was ISO8859-1) to java strings, wrote that as UTF-16LE bytes on the wire, moved it over to the .NET side and read it back in, then converted the UTF-16LE bytes over to UTF-16BE .NET native encoded strings. VD also reverses this from .NET -> wire ->java. The conversion tables in both java and .NET are quite good, and UTF-16 has conversion for lots and lots of other code pages in both .NET and java.
Continue reading...
Continue reading...