Subj : Test Reply To : deon From : apam Date : Sun Dec 24 2023 09:27 am > Re: Test Reply > By: apam to deon on Sun Dec 24 2023 07:25 am > > Howdy, > > > You should probably translate the block drawing characters in the clearing > > houz header to utf-8 if you're replying to a utf-8 messages (and reusing a > > utf-8 kludge) > > > > I don't know if php has it, but i just use iconv with CP437 -> UTF-8 > > I did think about doing that (php has utf8_encode() - although that converts from LATIN-1), but I was concerned how it would appear to CP437 users... > If CP437 users are viewing UTF-8 messages, either their software should convert the UTF-8 to CP437 or it should look like gibberish. > Another approach I was thinking of is parsing the original message and see if it is really UTF-8 (which in this case I dont think it was), and then respond with CP437 in the kludge... > You could just ignore the sender's kludge and reply with a CP437 kludge, but then you would have to convert any UTF-8 characters to CP437 (which isn't so easy as there are far more utf-8 characters than cp437 characters. iconv has the option to transliterate (replace characters with similar characters in the codeset, and an ignore option to ignore characters - i use both options, so ignore is the last resort. But yeah, right now if people send utf-8 messages and you respond with the same kludge, you've got a message with potentially characters from both codesets, so the recipient can't reliably decode it. It probably isn't really a big issue as it's just box drawing characters for the headers, but ftn people can be finicky for details ;P > (That said, I've just discovered that utf8_encode() is deprecated, and I would need to use the mb_* functions. And there is mb_detect_encoding() - I can play with that and see what it guesses...) > It's hard to find anything to convert CP437, GNU iconv does most of the time, but some distros sepearate deprecated codesets or just don't include them. Andrew --- Noddy git-ad30e12 * Origin: Smuggler's Cove - scove.talismanbbs.com:2323 (21:1/182) .