• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Charsets: almost there!

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Uff, look at the http://dan.solutions.lv/forum
(if it doesn't give you Exceptions)

It works with cyrillcs. However, I've done some modifications. And something's still done wrong. But it works, at last!
[originally posted on jforum.net by Daniil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OKay, so I've modified templates (added accept-charset= to forms plus fixed some attribs around for xml compliance (not all, just what I've seen in the <form> tag)) and the source (req.setCharacterEncoding(encoding);). Not sure how to make a patch, but download template and src dirs tar.bz'ipped here:

http://dan.solutions.lv/download/jForum_mod/

I'm not sure if the <form> modifications were strictly necessary, but they won't hurt (I think, he-he-he).

That's not the end of charset problems, anyway. More on this later. I'm going to sleep now.
[originally posted on jforum.net by Daniil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Niiice

You did that using rc3 or rc 3.1? on 3.1 I let the admin to configure the charset via admin panel.

I'll take a look in your modified files late.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rafael Steil wrote:Niiice

You did that using rc3 or rc 3.1?


3.1.

And there are problems left, but mostly it's working. After you look into the modified source, I'll explain what else is wrong. Stay tuned
[originally posted on jforum.net by Daniil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, patches are here:

http://dan.solutions.lv/jforum/patches/

From my readme: :twisted: 8)

Patches charsets_templates-over_rc31.patch and charsets_src-over_rc31.patch
make charset setting in JForum RC3.1 work.

Apply charsets_src-over_rc31.patch with

patch -p2 < charsets_src-over_rc31.patch

from the root source directory (src/).

Apply charsets_templates-over_rc31.patch with

patch -p2 < charsets_templates-over_rc31.patch

from the root templates directory (templates/).

-- Daniil V. Kolpakov



Known issues:

  • Windows-xxx charset's won't work, because Java has different names for them. We need to do some mapping (I think java.nio package has something to do with that).
  • For best results, mysql should use the same charset as forum, or else MySQL Connector/J driver will replace some chars with "?"s.

  • [originally posted on jforum.net by Daniil]
     
    Migrated From Jforum.net
    Ranch Hand
    Posts: 17424
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Ups, I've just realised it was better to open this topic in the "Contributions" cathegory. Will you please move it, Rafael?
    [originally posted on jforum.net by Daniil]
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic