Index

(misc)

o2_encode

string o2_encode(string $string)

Returns passed string translated to the current application character encoding.
Translation is applied only when needed, according with string and application encoding.
This function is mostly useful in HTML context, when you need to out a text and you don't know its actual encoding (Windows-1252 from program or UTF-8 from DB).


Parameters:
  1. $string
  2. String to be encoded