JavaScriptテックラボ

jQueryのloadで文字化けする場合の対処

2013年7月4日

jQueryで外部ファイルを読み込む際はload()メソッドを使いますが、デフォルト文字コードはUTF-8なので、Shift-JISであったりすると文字化けが発生します。
UTF-8でエンコードしておくのが一番ですが、そうもいかない時はxhr.overrideMimeType()に文字コードを指定してあげます。

Comment

  1. Every weekend i used to visit this site, for the reason that i wish for
    enjoyment, for the reason that this this site conations in
    fact fastidious funny stuff too.

  2. What i do not understood is in reality how you are no longer really much more neatly-appreciated than you may be
    now. You're very intelligent. You know thus significantly in the case of this subject, made me personally believe it from a lot of numerous angles. Its like women and men are not fascinated except it is one thing to accomplish with Woman gaga! Your own stuffs nice. Always handle it up!

  3. Simply want to say your article is as astonishing.
    The clearness in your publish is simply cool and that i can suppose you are an expert on this subject.
    Fine along with your permission allow me to grab your feed to keep up to date with drawing close post.
    Thanks one million and please carry on the rewarding work.

  4. Very great post. I simply stumbled upon your weblog and wished to say that I have truly enjoyed surfing around your weblog posts.
    In any case I will be subscribing to your rss feed and I am hoping you write again soon!

  5. Greetings I am so glad I found your blog page, I
    really found you by error, while I was looking on Digg for something else,
    Anyhow I am here now and would just like to say thanks for a fantastic
    post and a all round interesting blog (I also love the theme/design),
    I don’t have time to browse it all at the minute but I have bookmarked it and also
    added in your RSS feeds, so when I have time I will be back to read a
    lot more, Please do keep up the superb b.

  6. Have you ever considered about including a little
    bit more than just your articles? I mean, what you say is
    important and everything. However just imagine
    if you added some great photos or videos to give your posts more,
    "pop"! Your content is excellent but with images and
    video clips, this blog could definitely be one of the greatest in its niche.
    Very good blog!

  7. I am really impressed with your writing skills and also with the layout on your
    weblog. Is this a paid theme or did you modify it yourself?

    Either way keep up the excellent quality writing, it is rare to see
    a nice blog like this one nowadays.

  8. I have been surfing on-line greater than three hours lately, yet I by no means found any
    interesting article like yours. It is beautiful worth enough for me.
    In my opinion, if all web owners and bloggers made excellent content material as you probably did, the net will likely be much more helpful than ever before.

  9. Nice post. I was checking continuously this weblog and I am impressed!
    Extremely helpful information particularly the ultimate part :) I deal with such info much.
    I was seeking this particular info for a long time. Thanks
    and good luck.

  10. Greetings from Woree, Australia.My name's Therese and I want to ask: do you have a spam issue on this blog? I too am a blogger, and I was wanting to know about your situation. Some of us have developed some effective strategies and we are seeking to trade ideas with other folks. Why not shoot me an e-mail if interested?

  11. I was recommended this blog by my cousin. I am not sure whether this
    post is written by him as nobody else know such detailed about my trouble.

    You are amazing! Thanks!

  12. Oh my goodness! Impressive article dude! Thank you so
    much, However I am going through troubles with your RSS.
    I don't understand the reason why I cannot subscribe to it. Is there anybody having the same RSS problems? Anyone that knows the solution can you kindly respond? Thanx!!

  13. Hello, i think that i saw you visited my web site so i came to “return the
    favor”.I'm trying to find things to improve my site!I suppose its ok to use some of your ideas!!

  14. I got this website from my friend who told me on the topic of this web page and now this time I am browsing this web page
    and reading very informative content at this time.

  15. Normally I don't learn article on blogs, but I would like to say that this write-up very compelled me to try and do so! Your writing style has been amazed me. Thanks, very nice post.

  16. Each day well-known consultants in the Indonesia receive more than $3 billion for their
    services. Much of this money pays for impractical data and poorly prepared resource fo review services, government rules & procedure evaluation.

    Our business model is focusing in guarding and improving practice.
    We undertake a range of zones of activity, including
    P5F - our own unique framework of review. We,
    have goodly experienced and talented consultants offer a wide variety of special consultation
    services to meet companies many needs.

    We provides you with the research and mathematics
    solutions to grow your share of the global market penetration.
    We have deep support that can help you achieve your business goals through consulting on
    strategic issues, product development, marketing programs and channels for distribution.

    A common objective for a statistical research project is to discover causality,
    and in particular to draw a conclusion on the effect of changes in the values of predictors or one variables on
    other variables or reactions. There are two main types of causal statistical
    studies: experimental study and observational study.
    In both types of studies, the effect of differences of an independent variable (or variables) on the behavior of the dependent variable are observed.

  17. Greetings! This is my first comment here so I just wanted to give a quick shout out and
    say I really enjoy reading through your articles.
    Can you suggest any other blogs/websites/forums
    that deal with the same subjects? Thanks a ton!

  18. Do you mind if I quote a couple of your posts as long as I provide credit and sources back to
    your site? My blog is in the exact same area of interest as yours and my users
    would definitely benefit from a lot of the information you present here.
    Please let me know if this ok with you. Appreciate it!

  19. I leave a response each time I appreciate a post on a site
    or if I have something to contribute to
    the discussion. It's triggered by the passion communicated in the article I read. And on this post jQueryのloadで文字化けする場合の対処 | Smart -Web Magazine. I was actually excited enough to post a thought :-) I actually do have 2 questions for you if you tend not to mind. Is it only me or do some of the responses look like written by brain dead individuals? :-P And, if you are writing on other online social sites, I'd like to keep
    up with you. Would you make a list all of all your community pages like your Facebook page, twitter feed, or linkedin profile?

  20. Or chances are you'll desire to wear something distinctly Irish, as being a Celtic cross necklace or classy Aran cardigan. Traditionally any shade of white represents innocence, purity as well as the devotion in the wife to her husband. The wedding in general looks amazing, but also in my it washes out of the bride.

  21. 開始に水ぶくれが生じる、をすることができます癒す、無愛想な ホワイト色かさぶたは 処理上、発熱水疱。にじみ出る潰瘍破裂 、黄色がかった液体。成長、どちらかとほとんどを取らなかった の間で、ブームタウン エリア に成長している牧草地します。スムーズにを振り払う 良いの土壌 は一般ににしがみついて の種類根。
    エルメスベルト

  22. Excellent beat !I would like to apprentice whilst you amend your site,
    how could i subscribe for a weblog web site? The account
    aided me a appropriate deal. I have been a little bit familiar of this your broadcast
    provided bright transparent idea

  23. With havin so much content do you ever run into any problems of plagorism or copyright infringement?
    My website has a lot of completely unique content I've either authored
    myself or outsourced but it appears a lot of it is popping it up all over the web without my permission.

    Do you know any ways to help protect against content from being ripped off?

    I'd really appreciate it.

コメントを残す

メールアドレスが公開されることはありません。

リズムファクトリーはホームページの制作会社です。
ホームページ制作に関するご要望・ご相談はこちらからどうぞ。