WordPress.org

Ready to get started?Download WordPress

Forums

Problem with some characters (7 posts)

  1. Eleka
    Member
    Posted 9 years ago #

    Hello friends.

    I'm developing a plugin that do the same as "Hello Dolly", but it take the input text of a plain text file in the hard drive. I'm spanish, and I use some king of characters that includes "tildes" (a little line on the top of some letters (a,e,i,o,u) and a special chracter used in spanish (eñe, I don'nt know if you would see it in this post).

    I read the file with fread function of php, but, whein I display the result of the plugin in the sidebar of my blog, the special characters are displayed how '?' ... What can I do to change this and make the characters visible?

    Thanks (and excuse me for my horrible use of english)

  2. Ryan Duff
    Member
    Posted 9 years ago #

    If I understand you correctly, you might need to change the encoding of the page to a character set that supports those characters. Other than that, I'm confused as hell as to what your problem is.

  3. Eleka
    Member
    Posted 9 years ago #

    Theorically, the charset is apropiated to shown this special characters, because in the posts of my blog, the same characters are displayed without problems. It only occurres if I try to "print" a special character in the sidebar ..

    Note: With the latest tests I do, the problem is with the function "fread" of PHP, I think that this function don't read properly the text file and then, the characters appears with '?'

  4. moshu
    Member
    Posted 9 years ago #

    Usually these problems in the sidebar appear when the files are edited in a text editor that doesn't support utf-8.

  5. Eleka
    Member
    Posted 9 years ago #

    I've used the notepad of Windows ... Don't question me about I use Windows on my server, it's a "familiy problem" lolol

    I will try with other text editor. I post soon

    Thanks!

  6. moshu
    Member
    Posted 9 years ago #

    If it's XP you have the option to save it as utf-8 encoded.

  7. Eleka
    Member
    Posted 9 years ago #

    Very thanks to all ... I've now tried to save the document in the Microsoft Word (I hate it), but saving it as plain text file, and Word answer me about the codification ... I choose UTF-8 and now is all ok.

    Very thanks to all

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.