Web Analytics Made Easy -
StatCounter Strip \u000d\u000a ? - CodingForum

Announcement

Collapse
No announcement yet.

Strip \u000d\u000a ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Strip \u000d\u000a ?

    I'm translating a string from english to spanish. I'm using the MS Bing translator. When the translated text is returned, I write it to a file and when I open the file up in my editor I see these characters: "\u000d\u000a" between lines of text.

    I know those are unicode chars but how do I convert them to regular \r\n chars?

    The following code doesn't work:

    PHP Code:
    $test=str_replace("u000d"""$s); 
    Thanks...
    RalphF
    Business Text Messaging Services
    https://www.MobileTextingService.com

  • #2
    $test=str_replace("\u000d\u000a", "\r\n", $s);
    Evolution - The non-random survival of random variants.
    Physics is actually atoms trying to understand themselves.

    Comment

    Working...
    X
    😀
    🥰
    🤢
    😎
    😡
    👍
    👎