How can Hungarian characters be used in translations of field labels within extension sr_feuser_register - typo3

Hungarian characters aren't displayed correctly when used in translations within sr_feuser_register. The characters are displayed correctly when used in regular content elements.
sr_feuser_register: 4.0.2
TYPO3: 6.2
PHP 5.6
MySQL 5.5
The website is a single tree, multilanguage site, languages are assigend to domains.
Here is the TS Setup for Hungarian language, other languages have been setup the same way:
[globalVar = GP:L = 15]
config.sys_language_uid = 15
config.language = hu
config.htmlTag_langKey = hu
config.locale_all = hu_HU.utf8
[global]
sr_feuser_register translations are defined through Typoscript the following way:
plugin.tx_srfeuserregister._LOCAL_LANG.hu {
username = Felhasználónév
...
}
When viewed in fronted, the sepcial characters are displayed incorrect. Output is something like: FelhasznĂĄlĂłnĂŠv
Same procedure works fine in other languages. Special characters are displayed correctly when viewing Chinese, German or Russian translation. Characters are stored correctly in the database (utf8_general_ci). Even more strange, when I use the characters in the same Typoscript for a language like french, the charachters are displayed correctly on the french frontend.
Example for french configuration in the same Typoscript Setup Template.
plugin.tx_srfeuserregister._LOCAL_LANG.fr {
username = Felhasználónév
...
}
All characters appear correct in french frontend. I have no idea at which point the characters get messed up and why the characters are displayed correctly when used in other languages.

Looks very strange indeed, I do not have a proper solution to provide, but are you able to debug the extension's core?
Could you try to modify these lines and see what happens?
https://github.com/TYPO3-extensions/sr_feuser_register/blob/162bad24641ea809297f0ef8aa787f1dee281385/Classes/View/Marker.php#L479

Hmm... first it looks for me that the metaCharset (https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Config/Index.html#metacharset) is not set to utf-8.
Please check that.
Also check if the collation of your database it correct set to utf-8.
Are german umlauts like äöü correct displayed?

Related

Turkish characters in TYPO3 RTE aren't possible at TYPO3 UTF-8 Installation?

I want to insert a turkish name into my TYPO3 RichText-Editor (RTE, sysExt. rtehtmlarea), for example: "Özoğuz". The special letter "ğ" is here my problem, I've only see a question mark, after saving my text content element (s. pictures).
My charset is UTF-8 (setup.ts) and the database is also utf-8
config.metaCharset = utf-8
I also tried to insert ğ instead of "ğ" at code view (<>), but I've got the error, see second picture.
-
Maybe the turkish language needs ISO 8859-9 (Latin-5)?
How can I allow turkish at my german TYPO3 Website?
Backend:
Frontend:
UTF-8 handles Turkish chars correctly, the DB error at save and later lack of Turkish special chars definitely indicates, that your DB or at least table or column doesn't use UTF-8, note that also for TYPO3 6.0+ it's required to create UTF-8 table yourself and $TYPO3_CONF_VARS['SYS']['setDBinit'] = 'SET NAMES utf8;' will be ignored (read the notice).
Make sure that your MySQL server is configured to work with UTF-8 by default and also convert wrong tables/fields to use it.

"Copy default content element" from other language than default

hope someone has a idea.
I run into a challenge on a multi language typo3 site.
The default language is english and there are two spanish languages. Now, after I've translates the first spanish, I would like to copy this to the second one.
So basicly I would like to say "Copy spanish #1 content element", instead of "Copy default content element"
In TYPO3 4.5 there was a quite nice extension "fl_langtranslate", but this not gonna work anymore in > 6.0.
Anyone have I idea or solution for that? I am wondering that TYPO3 is not gonna do this out of the box.
Cheers!
If you run into this issue quite often, I'd suggest to think about a language-fallback.
Using TypoScript, you can define which language to fall back if your translation isn't available.
Here's an example:
Here's an example for English (en) as 0, Spanish (es) as 1 and Mexican Spanish (es-MX) as 2.
# Don't fall back to another language. If it's not translated, the user has to switch the language.
sys_language_mode = strict
# english language
sys_language_uid = 0
[globalVar = GP:L = 1]
config.sys_language_uid = 1
[global]
[globalVar = GP:L = 2]
config.sys_language_uid = 2
# Try es-MX first and if not available, try es-ES. If that's not available, too, this page is not translated.
sys_language_mode = content_fallback ; 2,1
[global]
You could also create a 3rd language and call it Spain Spanish (es-ES) and use it for content that's just for people living in Spain and just never use the id 1 for creating links - just for content-translation ;)
The most extensions does not work in 6.0 because of some API-functions which has been changed. So perhaps check your PHP-Errorlog. Usually it is easy to replace the API-function. There is t3lib_div::int_from_ver noted at http://wiki.typo3.org/TYPO3_6.0_Incompatible_Extensions_F
use t3lib_utility_Version::convertVersionNumberToInteger() instead.
In TYPO3 version 7.5 this feature is implemented, you can choose in a selectbox near the button "Copy default content elements" from which language you want to copy the content elements.
Ext. fl_langtranslate now should work with TYPO3 6.2 but has a bug, if you removed the prefix "Translate to..." (if the "l10n_mode" is not "prefixLangtitle"):
$GLOBALS['TCA']['tt_content']['columns']['header']['l10n_mode'] = '';

Howto make JRequest::getVar filter correctly accented characters?

I want to filter some variables with accented character on a component for joomla1.5 for example:
$name = JRequest::getVar('name', '', 'post','WORD');
but the getvar function filters áéíóú. I need this get well for a form in spanish language.
I'm new to joomla development, but for as far as I can see, it doesn't let me set any other parameter to config to get this.
Is there a way to do this with the advantage of filtering with JRequest::getVar or should I create a function myself which does so?
Do you mean JRequest::getVar() removes symbols like 'áéíóú'? It is very weird because I've worked on Joomla with danish and hebrew symbols. And they were passed through GET, POST, SESSION successfully. Because Joomla works with UTF8 and it understands such symbols. The problem could be only in your file encoding. They should be in UTF8. Is it so? If not try to change it. This should help.

Should I use hex ascii accented character code in HTML or use the actual character?

I have several huge CSVs with lots of accented characters in html hex code: é for é and lots of others, even – for –, etc.
My site is a wiki for people to update listings. So when they are presented a textarea for update, the existing content is filled in, and obviously those hex codes will be shown.
Should I be bothered replacing those codes with actual accented characters, or just leave it as it is? I wrote a script to replace the characters, but somehow the output are weird characters. Probably the format saved in Ruby isn't in UTF-8 format.
By default my site is in UTF-8, and the accented characters are displayed properly with some html coding in the view.
Please advise. Thanks.
Could you clarify what the problem is?
If your data (CSV) is in UTF-8, and the default encoding of your site is UTF-8, then all you would need to do is make sure that when users are editing content, that content is properly treated as UTF-8.
You may not need to display the markup to the users. Perhaps you could leverage a WYSIWIG editor package like TinyMCE?

UTF8 charset, diacritical elements, conversion problems - and Zend Framework form escaping

I am writing a webapp in ZF and am having serious issues with UTF8. It's using multi lingual content through Zend Form and it seems that ZF heavily escapes all of these characters and basically just won't show a field if there's diacritical elements 'é' and if I use the HTML entity equivalent e.g. é it gets escaped so that the user will see 'é'.
Zend Form allows for having non escaped data, but trying to use this is confusing, and it seems it'd need to be used all over the place.
So, I have been told that if the page and the text is in UTF8, no conversion to htmlentities is required. Is this true?
And if the last question is true, then how do I convert the source text to UTF8? I am comfortable setting up apache so that it sends a default UTF8 charset heading, and also adding the charset meta tag to the html, but doing this I am still getting messed up encoding. I have also tried opening the translation csv file in TextWrangler on OSX as UTF8, but it has done nothing.
Thanks!
L
'é' and if I use the HTML entity equivalent e.g. é it gets escaped so that the user will see 'é'.
This I don't understand. Can you show an example of how it is displayed, as opposed to how it should be displayed?
So, I have been told that if the page and the text is in UTF8, no conversion to htmlentities is required. Is this true?
Yup. In more detail: If the data you're displaying and the encoding of the HTML page are both UTF-8, the multi-byte special characters will be displayed correctly.
And if the last question is true, then how do I convert the source text to UTF8?
Advanced editors and IDEs enable you to define what encoding the source file is saved in. You would need to open the file in its current encoding (with special characters being displayed correctly) and save it as UTF-8.
If the content is messed up when you have the right content-type header and/or meta tag specified, then the content is not UTF-8 yet. If you don't get it sorted, post an example of what it looks like here.