Jump to content

Characters


cags

Recommended Posts

This isn't exactly a Regular Expressions question, but since it's in relation to a pattern and I couldn't think of anywhere better to put it, it's going in the Regular Expressions section. The PHP manual defines valid user-defined function names as being...

 

[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*

 

Ok, fair enough, but what characters are \x7f-\xff? As far as my knowledge stretches \x is an escape character followed by a hex code of some kind. But they aren't any valid ASCII characters that I know of, so what encoding is it? I never did fully understand character encodings.

Link to comment
https://forums.phpfreaks.com/topic/185352-characters/
Share on other sites

If that is the case, that doesn't make a whole deal of sense (to me at least). Since \x7f-\xff indicates all characters in that range, 7f is DELETE, &nbsp is also included in that range. I can perhaps understand some of the foreign characters being accepted but there are a lot of characters in that range that I really wouldn't expect to be valid. Having said that, I tested a few at random such as ¶ and they do appear to be valid.

Link to comment
https://forums.phpfreaks.com/topic/185352-characters/#findComment-978498
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.