UTF-8 Encoding and Languages

The Easy PHP Calendar will work with many different languages. The default encoding of the calendar is UTF-8. This is generally the web standard and there are no known issues with the calendar using this encoding format.

It is highly recommended that your pages also be set to the UTF-8 encoding format so that everything will display as expected. However, if you need a different encoding for your pages, in most instances, you can simply edit the calendar settings and change the encoding type to match your requirements. Please note, if you change the encoding format after entering events, the events may need to be re-entered as they were saved in the old encoding format.

In some instances, changing the encoding format of the calendar may not be the best solution and it may not produce the desired results. In this situation, it is best to leave the calendar set to UTF-8 and use built-in functions of PHP to convert the calendar output to your page encoding format.

In this example, the output of the calendar is converted from UTF-8 to Windows-1253 (Greek) to display inside of a Windows-1253 encoded page:

iconv_set_encoding("internal_encoding", "UTF-8");
iconv_set_encoding("output_encoding", "Windows-1253//TRANSLIT");
ob_start("ob_iconv_handler");
require("calendar/calendar.php");
ob_end_flush;

The key here is to wrap the calendar "require" statements with the additional PHP iconv encoding code (as shown above).

HOW TO FIND THE HTML ENCODING FORMAT IN AN EXISTING WEB PAGE

To find and/or change the encoding of your pages (not the calendar), look at the raw HTML and, usually near the top, for the charset:

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

Răspunsul a fost util?

 Tipărire

V-ar mai putea interesa și

How to use $thisFile

In some instances, PHP will not be able to provide the calender with the correct file name of the...

How to use the unset command

If you are displaying multiple copies of the calendar on the same page, you may need to clear...

Temporary Domains

Symbolic links (temporary domains) can affect the paths the calendar uses. If you're using...

Can not log in to the fourms or the support ticket system

*NOTE: The support ticket system was changed in the first part of 2012. All previous support...

Why is the time an hour off?

Does your calendar mark the next day an hour late or an hour early? This probably is because of...