Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Add Special Characters

Asked Modified Viewed 7,790 times
V
Vyper69
V
Unprecedented Times call for Unprecedented Measures
  • Senior Member, joined since
  • Contributed 551 posts on the community forums.
  • Started 146 threads in the forums
  • Started this discussions
asked
Senior Member

I was wanting to know how I could add 2 extra characters to allowed characters. The 2 I want to add are [ ]. Can someone point me in the right direction as to what to edit. thanks
0 replies

29 posts

F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Ok, let´s try one of these.

// Locale Settings UTF8 mode
setlocale(LC_ALL, 'cs_CZ.utf8');
$locale['charset'] = "UTF-8";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";

// Locale Settings Windows Charset mode
setlocale(LC_ALL, 'cs_CZ');
$locale['charset'] = "Windows-1250";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";
0 replies
C
CrackCZ
C
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

WOW!


// Locale Settings Windows Charset mode
setlocale(LC_ALL, 'cs_CZ');
$locale['charset'] = "Windows-1250";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";


This looks like it works. I'll check if it's damaged the characters throughout the site but at first glance it's okay.

Anyway, the characters already in the registration work. Thank you very much for your time. If there was a problem I'll call. However, it seems that it's all been fine.

once again thank you very much indeed

Merged on May 21 2014 at 12:52:29:
I ran into a problem symbol žš is ok bat letter čěř do not work

Merged on May 21 2014 at 12:54:56:
s27.postimg.org/7qb24h1hb/znaky.png


1 - NO
2 - YES
3 - NO
4 - NO
5- YES
6- YES
7- YES
8- YES
9- YES
Edited by CrackCZ on 21-05-2014 13:54,
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Hi,

I have been watching this thread. :)

What a nightmare this is turning out to be, there must be a solution to this, so for the future people can fix it easier. I myself do not know all that much about char lang encoding so I can't help much. One thing that springs to mind is to check your SQL collation is correct. PHPMyAdmin should help with that. What collation should it be? I have no idea but look into it. This is unlucky. Anyone else can help in here hopefully? Fix it I am hoping. :G It's getting close to the correct one sure Domi prob knows the next one to try.

Regards
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

It is abit odd indeed, yes. But we only lack knowledge in the combinations available for it.

I have been working on a more clever way to handle locale and esp handling charsets and the preg_matches system wide.

For now, hard code the chars that seems to be cut short to the matching areas, or are they also not working as displayed chars?

if (!preg_check("/^[\w-0-9A-Z\č\ě\ř_@\s\[\]]+$/i", $this->_userName)) {

or

if (!preg_check("/^[\w-0-9A-Z\č\ě\ř_@\s\[\]]+$/i", $this->_userName)) {

0 replies
C
CrackCZ
C
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

in include/classes/ UserFieldsInput.class.php ?? This? Now they have this but it still does not work


if (!preg_check("/^[\w-0-9A-Z_@\s]+$/i", $this->_userName)) {



The codes you sent those do not work well nothing changed and still do not work those 3 characters. Unfortunately, they are important but :-(
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

We probably have a wierd case of combo issue here, but we continue to try variations for you.

This is my next suggestion,

// Locale Settings Windows Charset mode
setlocale(LC_ALL, 'cs_CZ.utf8');
$locale['charset'] = "Windows-1250";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";


Try with original \w mod for testing.
0 replies
C
CrackCZ
C
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

I very much appreciate your time, unfortunately, even this does not work :-(
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Let´s try a PCRE method and see what we get..

You need to update the file UserFieldsInput.class.php

with

if (!preg_match("/^[\p{L}a-zA-Z\s]+$/", $this->_userName)) {


then change the locale/yourlocale/global.php either

this


// Locale Settings Windows Charset mode
setlocale(LC_ALL, 'cs_CZ.utf8');
$locale['charset'] = "UTF-8";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";


or this, both should be unicode compatible.


// Locale Settings Windows Charset mode
setlocale(LC_ALL, 'cs_CZ');
$locale['charset'] = "Windows-1250";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";
0 replies
C
CrackCZ
C
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

In both, I'm still writes the user name contains invalid characters :-/
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Update, I just noticed, I mixed the charsets some.
Please use the mod you had where it worked first time ( except a few chars )
And use this one in your global, note the small change from 1250 to 1252 , crossing my fingers for ya ;) But in worse case, follow the below guide.


// Locale Settings Windows Charset mode
setlocale(LC_ALL, 'cs_CZ');
$locale['charset'] = "Windows-1252";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";


Be careful in what charset you save your files.
Make certain that you save it in on Windows-1250 ( your text files )
If you do not know what format you run you need to get Notepad++ or similar
Windows 1250 is ANSI there, use the conver to to ANSI function and edit in ANSI format settings.

In some labs I have done I have noticed that special characters does not always work well in UTF-8 and certain locale combos.

If you first run this ,

// Locale Settings Windows Charset mode
setlocale(LC_ALL, 'cs_CZ');
$locale['charset'] = "Windows-1250";
$locale['xml_lang'] = "cs";
$locale['tinymce'] = "cs";
$locale['phpmailer'] = "cs";


And also run thru the preg_match scenarios you have in previous posts, even hardcoded characters.

Double check your files so they are saved with correct format and start with \w switch, it is supose to work with global.

If nothing works with the above you can try to to do the same with the utf8 combo, once again convert and save your files in utf8.
Edited by N/A on 23-05-2014 17:28,
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 29 posts
  • Votes 0 votes
  • Topic users 6 members

6 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
A
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
V
V
Unprecedented Times call for Unprecedented Measures
  • Senior Member, joined since
  • Contributed 551 posts on the community forums.
  • Started 146 threads in the forums
  • Started this discussions
C
C
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 4 threads in the forums
A
A
Sorry for my bad english, still learning! smile
  • Newbie, joined since
  • Contributed 7 posts on the community forums.
  • Started 2 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet