Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow normalisation of white space #648

Closed
pfumagalli opened this issue May 18, 2015 · 2 comments
Closed

Allow normalisation of white space #648

pfumagalli opened this issue May 18, 2015 · 2 comments
Assignees
Labels
feature New functionality or improvement
Milestone

Comments

@pfumagalli
Copy link
Contributor

One of the features I found extremely useful in XSLT/XPath/XQuery was the normalisation of white spaces within a string (in other words, on top of trimming a string, any multiple occurrence of a white space character gets replaced by a single white space character).

For example the string hello\r\nworld!\t would be normalised simply as hello world!.

This is extremely useful in non-latin (read Japanese, I live in Tokyo) languages where a number of characters can be used for separating words. In Japanese, normally people type the unicode character \u3000 as that's what entered by default when hitting "space" on the keyboard, but that's not necessarily what one might want to retain.

For example, I'd love for the string 山田 太郎 (the space used here is the normal space I get when using the Japanese keyboard, copy and paste it into hexdump -C on a UTF8 console) into a more normal 山田 太郎 (replaced with ASCII 0x20).

@Marsup
Copy link
Collaborator

Marsup commented May 18, 2015

This looks like a duplicate of #586, just more specialized.

@Marsup Marsup added the request label May 18, 2015
@Marsup Marsup self-assigned this May 18, 2015
pfumagalli added a commit to usrz/joi that referenced this issue Jun 6, 2015
@Marsup Marsup added this to the 6.5.0 milestone Jun 6, 2015
@Marsup Marsup closed this as completed Jun 6, 2015
@hueniverse hueniverse added feature New functionality or improvement and removed request labels Sep 19, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

3 participants