in reply to Re^5: Do I have a unicode problem, or is this something else?
in thread Do I have a unicode problem, or is this something else?

Two major problems:

Your solution also has some potential bugs.

On the stylistic side,

Update: Added second major problem.

Replies are listed 'Best First'.
Re^7: Do I have a unicode problem, or is this something else?
by Steve_BZ (Chaplain) on Jun 11, 2010 at 20:15 UTC

    Hi ikegami,

    Thanks for this. I'll start with the end first.

    The style points: I'm never quite sure which characters need escape sequences and which don't, so thanks for the clarifications there. All good points and I'll incorporate them.

    Potential bugs: it's true. Not to mention '& amp' etc. But I don't expect to see these here, and if I do, they'll come up in testing. I'm not sure I understand the last point.

    Intro: I don't have any control over the generation. It's done for me, so I can't do it any other way (unless you think I can).

    Have a good day.

    Regards

    Steve

      Not to mention '& amp' etc

      Which brings up another major bug: you're decoding entities you shouldn't. &, among others.

      I don't have any control over the generation. It's done for me, so I can't do it any other way

      I know. That's not relevant to anything I said. Unless you know the generator behaves in the specified ways, *your* code has the specified bugs.