| Issue 107: | caractères accentuées | |
| 4 people starred this issue and may be notified of changes. | Back to list |
Mon problème est que dans le calendrier le titre de l'événement contient les caractères accentuées en français (é , è , ê ...) qui empêche 'affichage de l'événement. Comment puis-je gérer cela. Merci
Sep 26, 2009
#1
ferdinand.amoi@gmail.com
Sep 30, 2009
I have no problem using those characters, using version 1.2
You should post your json here.
This is my response for an event with the title: é , è , ê
[{"id":"4","title":"\u00e9 , \u00e8 , \u00ea
(3%)","start":"2009-09-09","end":"2009-09-10","duration":"1","status":"-1","sub":"ewr","lft":"7","rght":"8","className":"task-4","weekends":false}]
The json is encoded using php method json_encode()
Nov 6, 2009
je pense qu il faut encoder en utf8 les données
Nov 26, 2009
glenza, thanks for the response. if you are outputting the event data from PHP, running it through json_encode should fix the problem. however, you can also put the following tag at the top of the <head> in your html document, to make it UTF-8 (thanks abiskri): <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Status:
Done
Nov 30, 2009
Issue 217 has been merged into this issue.
Nov 30, 2009
so if you are in php, do this.. <?php echo json_encode($your_event_array); ?>
Nov 30, 2009
I already use json_encode() but it seems to fail into special characters translation.
[{"id":"14354","title":"attivit#","start":"2009-12-02T07:00:00Z","end":"2009-12-02T14:00:00Z","url":"view_attivita.php?id_attivita=14354","allDay":false}]
[{"id":"14354","title":null,"start":"2009-12-02T07:00:00Z","end":"2009-12-02T14:00:00Z","url":"view_attivita.php?id_attivita=14354","allDay":false}]
As u see if I translate the special character à into #, json_encode() returns the
correct value.
When the string contains à the function returns null instead O_o
Dec 2, 2009
Ok I fixed it using utf_encode() to encode the event title BEFORE it get encoded with json_encode() Now it works great ;)
Dec 3, 2009
nice. thanks for posting about your solution!
Apr 6, 2010
The correct name of the function you´ve got to use for the title-conversion is called "utf8_encode()" not "urf_encode()". Greetings!
Jun 12, 2010
In my case, I get the data from MySql, which is already converted into utf8, passed with JSON. If I don't do any treatment on data, especially on event.title...the event show all right...
I got a strange experience if this is the title of the event:-
RQ11.00-1HR-MOS 48 JY0306 <REMIND時再提$4K>
The thing <REMIND時再提$4K> will disappear, after I pass them to jquery ui dialog like that:-
msg="<table class='align_l'>"
+"<tr><td style='width:80px;'>Name</td><td>"+event.details+"</td></tr>"
+"<tr><td>Remarks</td><td>"+event.title+"</td></tr>"
+"<tr><td>Location</td><td>"+event.location+"</td></tr>"
+"</table>"
var y1= event.start.getFullYear();
var m1= event.start.getMonth()+1;
var d1= event.start.getDate();
var t1= event.start.toTimeString().substr(0,5);
var t2= event.end.toTimeString().substr(0,5);
$('#dialog').html(msg).dialog({
width:600,
title: y1+'-'+$.strPad(m1,2)+'-'+$.strPad(d1,2)+' '+t1+'-'+t2 ,
buttons: {
'Edit': function() { $(this).dialog('close'); } ,
'Delete': function() { $(this).dialog('close'); } ,
'Leave': function() { $(this).dialog('close'); } ,
'Arrival': function() { $(this).dialog('close'); }
}
});
Jun 15, 2010
The problem was solved by convert to html entities, before sending to dialog box...
Jul 11, 2012
JSON failed to render in the presence of double quote characters, Chr(34), when the substitute string was using an appended double backslash character string. This was resolved by appending with only a single backslash character as shown in the following code snippet when building the title piece: ' construct the JSON array entry, see following URL for all supported parameters ' http://arshaw.com/fullcalendar/docs/event_data/Event_Object/ out = out & "{" out = out & "id: " & objRel.GetId() & ", " out = out & "title: " & q & path & " [" & status & "] [" & rfcNum & "] - " & Replace(objRel.GetDisplayName(),Chr(34), "\"& Chr(34)) & q & ", " out = out & "start: new Date(" & startdate & "), " If enddate > 0 Then out = out & "end: new Date(" & enddate & "), " End If out = out & "allDay: false" & ", " out = out & "url: "& q &"javascript:var opn_wnd=window.open('tmtrack.dll?IssuePage&TableId="& _ objRel.GetRecTableId()&"&RecordId="&objRel.GetId()&"&Template=view', '_blank')"& q out = out & "}," 'Call Ext.LogInfoMessage(out) |
|
| ► Sign in to add a comment |