Page 2 of 2

Re: My real sites

PostPosted: Sun Jun 13, 2010 8:57 pm
by chst
Hello rcph,
give me a hint how you work out with encoding characters. In polish language i've same problems with characters like in czech lang i think.

One more, tell me please how you get two-letter shortcut of day name (instead of 1 letter shortcut) in top of month calendar?

Best regards, Chst.

Re: My real sites

PostPosted: Sun Jul 04, 2010 11:32 pm
by rcph
Hi, I'm sorry, I've been here a long time. For proper viewing diacritics must be set for all files!!! that are encoded in UTF-8.
You must edit the file
Code: Select all
if($k==7)    $weekday = substr($lang["day_0"][0],0,2);
else      $weekday = substr($lang["day_".$k.""],0,2);


Re: My real sites

PostPosted: Mon Dec 20, 2010 7:09 am
by mtnliving
Hi Chris, Thanks for a great easy to use Availability Calendar. I recently took over programming a site for a family member to help him save money while I learn the programming. So I am a novice and was very happy to find this easy to use free calendar. I will donate a few dollars, sorry won't be more, but recently out of work like many others. Anyways wanted to share how I used it in the site. I can at least contribute that much and answer any questions. Thanks again! :) ... &Itemid=55

Encoding problem - substr

PostPosted: Thu Jul 14, 2011 1:24 pm
by andrijana
Hello. I had similar/same problem that I have just fixed. Posting here as have not seen this solution in forum.

ajaxcal 1.jpg
ajaxcal 1.jpg (87.39 KiB) Viewed 6724 times

ajaxcal 2.jpg
ajaxcal 2.jpg (87.95 KiB) Viewed 6724 times

You can see that the problem was specific to substr function, and it wasn't the problem with general encoding.

Solution was to change from substr to mb_substr function in file. mb_substr is needed to be able to substring texts with multibyte encodings. No idea if this is good long-term solution (I am not much of a programmer) but it works now :)

< $weekday = mb_substr($lang["day_".$k.""],0,1,'utf-8');
> $weekday = substr($lang["day_".$k.""],0,1);
< if($k==7) $weekday = mb_substr($lang["day_0"][0],0,1,'utf-8');
< else $weekday = mb_substr($lang["day_".$k.""],0,1,'utf-8');
> if($k==7) $weekday = substr($lang["day_0"][0],0,1);
> else $weekday = substr($lang["day_".$k.""],0,1);