Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Foreign Language Problems

  1. #1

    Default Foreign Language Problems

    Hello,

    I have this problem: I set a grid that gets its data from a json file.
    some of the vars there are in hebrew.
    I can see in the FireBug that it gets question marks where the hebrew chars were.
    and of course i get the same result in my grid.

    how do i solve this?

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    What character encoding scheme does your server use to convert its Characters into a byte stream to send down the wire?

    Whatever scheme it uses, you have to tel the browser that in your Content-Type header:

    http://www.w3.org/Protocols/rfc2616/....html#sec14.17

    http://www.w3.org/Protocols/rfc2616/...c3.html#sec3.4

    http://www.w3.org/International/gett...ted/characters

  3. #3

    Default

    Hi,

    I have a content type in the Grid html (<meta http-equiv="Content-Type" content="text/html; charset=windows-1255" />)

    but the problem is in the file that generates the json list.
    i can't put there the meta line because it isnt a html file it is just a generated json list.
    can i put the Content-Type inside the javascript and not as a meta?

  4. #4

    Default

    Your server should return an HTTP Header named Content-Type with proper values.

  5. #5
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    You're using remote paging, and sending Json from the server?

    You'll have to set the "charset" property on the Content-Type HTTP Header.

  6. #6

    Default

    Thank you very much.
    solved it with

    Code:
    Response.ContentType = "text/html; charset=windows-1255"

  7. #7

    Default

    I have another problem regarding content type,
    this time i'm trying to send a POST from a basicform which has hebrew chars.
    how do i do something like XMLHttp.setRequestHeader('text/html; charset=windows-1255')
    inside Ext?

  8. #8
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    If you are using YUI as the underlying library (and it is the most robust and well designed), then you should be able to use the methods of YAHOO.util.Connect to set headers.

    Docs are only at YAHOO, and their generator is not nearly as good as Ext's, but: http://developer.yahoo.com/yui/docs/...l.Connect.html

    try initHeader()

    YMMV, I haven't tried this yet.

  9. #9

    Default

    so I need to work with another library to change the charset?

    my post looks like this:

    Code:
    gridForm.submit(
    {
    waitMsg: 'Saving changes, please wait...',
    url:'true.asp',
    params:{data:jsonData},
    success:function(form, action) {
    alert('Congrats!  Your changes were saved!!!!');
    },
    failure: function(form, action) {
    alert('Oops the delete did not work out too well!');
    }
    								
    }
    );
    in the jsonData there are hebrew chars that need to be sent to the server to update the database
    isnt there an easier way to set the charset?

  10. #10
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Ext sits on top of foundation libraries which provide cross-browser access to DOM, event, animation and Ajax utility classes.

    You choose which of them to use when you include adapters.

    So. If you are using the YUI adapter, then you can use YAHOO.util.Connect methods to set headers.

    Currently, the Ext.form.Action class does not offer a way to set headers.

    I think it's arguable that it should offer this for precisely the reasons that you are giving now. So I'd suggest posting a feature request.

    But for now, a reasonable easy workaround would be to use YAHOO.util.Connect.initHeader()

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •