15,049
edits
mNo edit summary |
|||
| Line 1: | Line 1: | ||
Counting number of characters (or bytes) in different approaches | Counting number of characters (or bytes) in different approaches | ||
== Character Count vs. Byte Count Comparison == | |||
<table border="1" class="wikitable sortable"> | <table border="1" class="wikitable sortable"> | ||
<tr> | <tr> | ||
| Line 35: | Line 36: | ||
<td>敏捷的棕毛狐狸從懶狗身上躍過</td> | <td>敏捷的棕毛狐狸從懶狗身上躍過</td> | ||
<td>14</td> | <td>14</td> | ||
<td> | <td>42</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Each Chinese character is approximately 3 bytes in UTF-8 | |||
== How to count characters with PHP == | == How to count characters with PHP == | ||