How to enforce CR+LF as new line for Multibyte languages in PHP

This was a hard one to find and even harder to test, therefore here it goes:

To enforce that every new line for your file always use CR+LF regardless of the Operating System, use chr(0x0D0A).

Remember to make sure that the encoding for the file is one that supports multibyte languages, like SHIFT-JIS.

To test, that is a bit harder, but you can use editors like BBEdit, TextWrangler, TextMate and Naurto (Japanese).

Have fun.

Advertisements

About mcloide

Making things simpler, just check: http://www.mcloide.com View all posts by mcloide

2 responses to “How to enforce CR+LF as new line for Multibyte languages in PHP

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: