bugz wrote to All <=-
I've been working on writing my own door and door library, but I've run into some interesting issues with ENiGMA. In my library, I try to
detect if utf8/unicode or cp437 is active, and adjust my output accordingly.
In core/door.js, I tried doing something like this:
doorDataHandler(data) {
if ('raw' === this.encoding) {
this.client.term.write(data);
} else {
this.client.term.write(decode(data, this.encoding));
}
}
NuSkooler wrote to bugz <=-
Sounds like you already found a work around via ACS, but you were on
the right track here.
When the external process is spawned we disable all encoding so
everything is "raw" between ENiG and the process. The handler you have above takes that raw |data| and decodes it based on the specified
encoding -- on the way out back to the client's term it has to be re-encoded to whatever their term specified.
e.g. PID -> UTF-8 -> Decode to JS/Unicode -> Encode CP437 -> Terminal
This is used successfully in a lot of setups, so I'd have to have more details as to why it's not working for you I guess -- assuming the work around isn't too much of of a PITA/you want to muck with it more :)
This is used successfully in a lot of setups, so I'd have to have more details as to why it's not working for you I guess -- assuming the work around isn't too much of of a PITA/you want to muck with it more :)
Actually, I have a problem with the normal process, also. My card door game is trying to use CP437 0x03, 0x04, 0x05, 0x06 (hearts, diamonds, spades, clubs). But I'm thinking that "iconv" (or whatever is doing the encoding) ignores these as control codes. [RATS!]
NuSkooler wrote to bugz <=-
Shoot I should have pointed this out prior. Yes, this is a known issue. iconv doesn't make an attempt to convert some of the "control"
characters in the CP437 table but instead spits out a placeholder. I
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,043 |
Nodes: | 16 (0 / 16) |
Uptime: | 92:03:56 |
Calls: | 500,956 |
Calls today: | 5 |
Files: | 109,377 |
D/L today: |
1,382 files (255M bytes) |
Messages: | 304,709 |
Posted today: | 1 |