• Hannes (unregistered)

    Looks like PHP is always up for a good spankin'!

  • Urgh (unregistered)

    since the condition is messed up wrt smaller/larger comparisons, the spanking does not really matter, though

  • Urgh (unregistered) in reply to Urgh

    On second reading it does,...

  • Anonymous Will (unregistered)
    if ($code<=19968 && $code>=40895)

    This condition can never be true. Was it || instead of &&?

    Gotta love the </spank> closing tag, too.

  • YellowOnline (unregistered)
    <html> <head><style>.buttocks {color: crimson}</style></head> <body><spank>
    </spank></body> </html>

    captcha: eros - how fitting!

  • (cs)

    Mmmm mojibake stew!

  • Bernie The Bernie (unregistered)

    return '<spank style="font-family:wtf-ouch">FRIST'; [CAPTCHA]suscipit: he begins. How true.[/CAPTCHA]

  • QJo (unregistered)

    "Spank" is one of those comedy words that can't be said with a straight face.

  • (cs)

    I, for one, am all for spanking programs when they misbehave.

  • Black Bart (unregistered)

    This snippet needs <Spanks> for shapely tagging.

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered)

    In Soviet Russia, monkey spanks YOU!

  • Peter (unregistered)

    Oooh! A spanking, a spanking!

    Naughty, naughty Zoot!

  • YellowOnline (unregistered) in reply to Peter
    Peter:
    Oooh! A spanking, a spanking!

    Naughty, naughty Zool!

    +1 for Monty Python references. Always.

  • nobulate (unregistered) in reply to Anonymous Will
    Anonymous Will:
    if ($code<=19968 && $code>=40895)

    This condition can never be true. Was it || instead of &&?

    Well caught, good Sir / Madam!

    TRWTF is that it always returns a tag with font-family:kochi-gothic.

    Everybody Knows Real Designers only use MS Comic Sans.

  • Dog (unregistered)

    Reminded me of a Korean girl I knew who provided me num nums.

  • Anon (unregistered) in reply to Peter
    Peter:
    Oooh! A spanking, a spanking!

    Naughty, naughty Zoot!

    DINGO: And after the spanking, the oral sex. GIRLS: Oral sex! Oral sex!

  • Squiggle (unregistered) in reply to YellowOnline
    YellowOnline:
    Peter:
    Oooh! A spanking, a spanking!

    Naughty, naughty Zool!

    +1 for Monty Python references. Always.

    There is no Zool, only data.

  • Gill Bates (unregistered)

    Please remember the elementary school rules. Attempted murder? Spanking. Successful murder? Spanking. Attempted assasination of El Presidente? Spanking. Successful assassination of El Presidente? Write "I will not kill El Presidente again" one hundred times.

  • YellowOnline (unregistered) in reply to Squiggle
    Squiggle:
    YellowOnline:
    Peter:
    Oooh! A spanking, a spanking!

    Naughty, naughty Zool!

    +1 for Monty Python references. Always.

    There is no Zool, only data.

    You get +1 too for an XML reference and because I only see because of your post he wrote ZooL instead of ZooT :(

  • (cs)

    It's not a spanking, it's the end of a spanking!

  • (cs) in reply to Anonymous Will
    Anonymous Will:
    if ($code<=19968 && $code>=40895)

    This condition can never be true. Was it || instead of &&?

    No, it is indeed never true, which is why it never returns the unaltered character and so always returns the cjk span wrapped version for any html entity that has four or more decimal digits.
  • Nagesh (unregistered)

    What exactly is Korean Japanese? Like kimchi sushi?

  • (cs)

    If my reading of the jolly docs on php.net (http://www.php.net/manual/en/function.preg-replace-callback.php) is correct, this will convert a run of compatible entities into a separate </spank> for each entity, which might be a bit expensive for large chunks of CJK text (even if you have fixed the <= && >= bug).

  • foo AKA fooo (unregistered) in reply to Steve The Cynic
    Steve The Cynic:
    If my reading of the jolly docs on php.net (http://www.php.net/manual/en/function.preg-replace-callback.php) is correct, this will convert a run of compatible entities into a separate </spank> for each entity, which might be a bit expensive for large chunks of CJK text (even if you have fixed the <= && >= bug).
    Who cares?
  • saepius (unregistered) in reply to foo AKA fooo
    foo AKA fooo:
    Steve The Cynic:
    If my reading of the jolly docs on php.net (http://www.php.net/manual/en/function.preg-replace-callback.php) is correct, this will convert a run of compatible entities into a separate </spank> for each entity, which might be a bit expensive for large chunks of CJK text (even if you have fixed the <= && >= bug).
    Who cares?
    Whoever is getting spanked probably cares. Those crazy Japanese, I hear they're into that sort of thing.
  • Joe (unregistered) in reply to Squiggle
    Squiggle:
    YellowOnline:
    Peter:
    Oooh! A spanking, a spanking!

    Naughty, naughty Zool!

    +1 for Monty Python references. Always.

    There is no Zool, only data.

    Or if you're a Mozilla developer:

    THERE IS NO DATA ONLY XUL.

  • (cs)
    spank(猿);
  • Anomaly (unregistered)

    TRWTF is converting from HTML to PDF, why not just deal with the HTML directly?

  • (cs) in reply to foo AKA fooo
    foo AKA fooo:
    Steve The Cynic:
    If my reading of the jolly docs on php.net (http://www.php.net/manual/en/function.preg-replace-callback.php) is correct, this will convert a run of compatible entities into a separate </spank> for each entity, which might be a bit expensive for large chunks of CJK text (even if you have fixed the <= && >= bug).
    Who cares?
    Not you, apparently, but others might wish to marvel in the supplementary WTF-ness of the way the replace-with-callback is being used.

    EDIT: or, indeed, tell me why I read the docs wrong.

  • foo AKA fooo (unregistered) in reply to Steve The Cynic
    Steve The Cynic:
    foo AKA fooo:
    Steve The Cynic:
    If my reading of the jolly docs on php.net (http://www.php.net/manual/en/function.preg-replace-callback.php) is correct, this will convert a run of compatible entities into a separate </spank> for each entity, which might be a bit expensive for large chunks of CJK text (even if you have fixed the <= && >= bug).
    Who cares?
    Not you, apparently, but others might wish to marvel in the supplementary WTF-ness of the way the replace-with-callback is being used.

    EDIT: or, indeed, tell me why I read the docs wrong.

    Whooooosh!11!

  • (cs)

    It is obvious that something has gone wrong with code somewhere.

  • anonymous (unregistered) in reply to Nagesh
    Nagesh:
    It is obvious that something has gone wrong with code somewhere.
    No shit! Really??
  • <generic nickname> (unregistered) in reply to Nagesh
    Nagesh:
    It is obvious that something has gone wrong with code somewhere.
    <generic reply>

    CAPTCHA: <captcha>

  • Duke of New York (unregistered)

    you blueposted a monty python reference? hang your head in shame

  • Paul Neumann (unregistered) in reply to Steve The Cynic
    Steve The Cynic:
    If my reading of the jolly docs on php.net (http://www.php.net/manual/en/function.preg-replace-callback.php) is correct, this will convert a run of compatible entities into a separate </spank> for each entity, which might be a bit expensive for large chunks of CJK text (even if you have fixed the <= && >= bug).
    [image]Yeah, I can see how that would be expensive on the browser renderer.
  • (cs)

    Man, browsers are getting advanced. Now, to deliver corporal punishment, parents only have to write an HTML page with

    <spank swats="3" device="hand" id="no-homework" alt="This will hurt me more than it hurts you.">
       Bad, bad, bad!!!
    </spank>
  • Nagesh (unregistered) in reply to Coyne
    Coyne:
    Man, browsers are getting advanced. Now, to deliver corporal punishment, parents only have to write an HTML page with
    <spank swats="3" device="hand" id="no-homework" alt="This will hurt me more than it hurts you.">
       Bad, bad, bad!!!
    </spank>

    In Hyderabad, if we making a joke that lame, our parents would have beat us with a tire iron.

  • (cs)
    The script used DOMPDF [...]
    So is that called an application these days? Convert HTML (which still is largely unfit for printed documents) to PDF using a third-party tool?

    At work, I solved this in Java by creating an in-memory DOM object, converting it using an XSL-T template into XSL-FO, and using Apache FOP to create the PDF. It leaves the code small and generic, and leaves you free to format the invoice any way you want by modifying the XSL-T/XSL-FO template.

  • Sir Lancelot (unregistered) in reply to Peter

    We were in the nick of time, you were in great peril.

  • QJo (unregistered) in reply to Nagesh
    Nagesh:
    What exactly is Korean Japanese? Like kimchi sushi?

    Probablement un peu like Franglais.

  • (cs)

    What would a <spank></spank> actually do? Turn the innertext pink with red highlights? Make it cry? Play horrible muzak from a cheap porno?

  • Axel (unregistered)

    Japanese for Chinese? That's a paddlin'. Japanese for Korean? That's a paddlin'. Japanese for Cyrillic? Ooh, that's such a paddlin'!

Leave a comment on “Chinese, Korean Japanese - It's All the Same”

Log In or post as a guest

Replying to comment #429907:

« Return to Article