×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Problems with "ä,ö,ü"

Problems with "ä,ö,ü" 12 years 11 months ago #12027

  • X-Bit
  • X-Bit's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 30
  • Thank you received: 8
Hello @all!

Using the German language on our site, wie found, that when you edit a comment, using backend (German as well), all the "ä,ö,ü" umlaute are changed.

After editing it looks somewhat like that:
��brigens: Heute i s t so ein sch�¶ner Tag und wir k�¶nnen - Gott sei Dank - s e h e n!

If we edit the comment on the frontend, this does not happen.

Thanks for any input!
Cheers

EDIT: Please advise, if you as well got the problem, that bbcode tags like are shown on the frontpage...
img39.imageshack.us/i/image1yh.png/
Thanks again!

Problems with "ä,ö,ü" 12 years 11 months ago #12033

  • X-Bit
  • X-Bit's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 30
  • Thank you received: 8
...anybody?

Problems with "ä,ö,ü" 12 years 11 months ago #12034

  • Nils Ally
  • Nils Ally's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 299
  • Thank you received: 33
In your language file, (/YOURSITE/language/de-DE/de-DE.com_comment.ini) just open it up in some editor (Notepad is great for this!), and just resave it as UTF-8 format.
Then just upload it to the same spot... and that should fix it... :D

PS, not sure if German is de-DE, but I hope you understand the process...

OPS, I just read your post again, that you get a different response regarding frontend editing to backend...
This sounds like a collation problem that stems from the SQL... at least I think... hehe, Daniel knows that stuff... If my previous suggestion doesn't work...

Problems with "ä,ö,ü" 12 years 11 months ago #12035

  • Nils Ally
  • Nils Ally's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 299
  • Thank you received: 33
As for those annoying tags showing up... hm... I have the same problem.
But, I have noticed it is dependent on what main template I am using.
It seems to me (I am not a programmer), that if the main site has a CSS that resides on a sub-folder (one level lower than normal), that the CSS from the comments seem to get confused, and end up not doing it correct.

Hm... actually... that gives me an idea... back soon after some tests... :/

Problems with "ä,ö,ü" 12 years 11 months ago #12036

  • X-Bit
  • X-Bit's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 30
  • Thank you received: 8
Thanks for the input, Nils...

But, as you remarked, it is not a BOM problem... as well I would never use Notepad for this kind of stuff, better would be Notepad++, PSPad or something similar.

The problem only hapens, if the comment is mofified at the backend, frontend doesn´t bring up the problem.

Will wait for Daniels opinion on this one.

Regarding your second post, yes, my CSS is residing in a subdirectory, as the most of the YOO templates have it. Maybe this has something to do with the problem?

Will wait for your testing reuslts...!

Problems with "ä,ö,ü" 12 years 11 months ago #12037

  • Nils Ally
  • Nils Ally's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 299
  • Thank you received: 33
I remember that someone else had a similar problem to you some time back, but I can't find the post...
I still believe this is a collation problem in the SQL... stemming from the editor.

Could you check your SQL for the collations there in the jos_comment table?

Here's how mine looks...


PS, Yes, Notepad ++ is amazing... but I normally still stick to the regular Notepad for Charset stuff... just an old habit I guess.

Problems with "ä,ö,ü" 12 years 11 months ago #12038

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey X-Bit,
sorry for the delay in my reply - it was a long trip back home...

About the preview of the comments - the ubbcode there is not parsed - that is why you see - if we try to parse the bbcode there you'll end with some pretty crazy html, because the comments are shortened and you will have an opened div, but not a closed one and more stuff like this...

About the umlauts please look here and do the changes:
dev.compojoom.com/projects/jocomment/rep...ent/tmpl/default.php

edit1: Sorry for the delay guys!

Problems with "ä,ö,ü" 12 years 11 months ago #12039

  • Nils Ally
  • Nils Ally's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 299
  • Thank you received: 33
Interesting...
I just looked, to see this bbcode thing again, and now it seems to be working nicely... :)
Might be something in the 4.1.8 upgrade...?

The only thing that doesn't seem to work is when I position in an image file, and try to link it to something.

PS, good you're back... ;)

Problems with "ä,ö,ü" 12 years 11 months ago #12040

  • X-Bit
  • X-Bit's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 30
  • Thank you received: 8
Daniel and Nils... thanks for your help!

The code changes did the trick, its working perfect now with the umlaute.

Nils, I already have the acutal 4.1.8 version and it did not change overnight by me :P but I can live with it, its not a real problem.

Thanks again, guys for helping me out and, welcome back, Daniel!

Problems with "ä,ö,ü" 12 years 11 months ago #12043

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
X-Bit do you think that removing the ubbcode from the preview comments is a better option than leaving it there inactive?
Daniel

Problems with "ä,ö,ü" 12 years 11 months ago #12047

  • X-Bit
  • X-Bit's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 30
  • Thank you received: 8
Sure, if possible to strip in the preview, it would be nicer... ;)

Problems with "ä,ö,ü" 12 years 11 months ago #12057

  • X-Bit
  • X-Bit's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 30
  • Thank you received: 8
I know where to strip the bbcodes, but I dont know how :P

Hi @all!

Looking at the /components/com_comment/classes/joomlacomment/JOSC_visual.php around line 538, I think this would be the place to do the BBcode striping...

Even found a nice function for doing this:
function stripBBCode($text_to_search) {
 $pattern = '|[[\/\!]*?[^\[\]]*?]|si';
 $replace = '';
 return preg_replace($pattern, $replace, $text_to_search);
}

...but got no clue how to implement it.

Any suggestions?

Problems with "ä,ö,ü" 12 years 11 months ago #12058

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I think that you are wrong.
The preview is generated in insertCountButton() (yep - this is stupid a function doing more than one thing...) There you have
if ($item['title'] != '') {
					$title = stripslashes($item['title']);
				} else {
					$title = stripslashes($item['comment']);
				}

so here you should call your stippBBcode function like this
stripBBcode(stripslashes(....));

I haven't tested it! - just looking at the code... :)
  • Page:
  • 1
Time to create page: 0.135 seconds