← Back to team overview

dhis2-devs team mailing list archive

Re: [Bug 612866] [NEW] Can't name dael, dael-group, dataset, ind in Vietnamese characters

 

OK, just as a test, I changed it to this..

return this.optional(element) || !(/[\d+!#&]$/i.test(value));

So, i do NOT want anything with numbers, pluses, exclamation marks,
hashes or amperstands. Forgot to add double spaces..anyway. I guess
there are probably more characters to be excluded.

I was able to store the data element name sans problem.

Might be a work around. That JavaScript library might have license
issues (MIT).

Maybe try server side validation and see where you get.

Regards,
Jason


On Tue, Aug 3, 2010 at 2:39 PM, Jason Pickering
<jason.p.pickering@xxxxxxxxx> wrote:
> Another option would be perhaps to try exclude what we do NOT want
> which I guess is punctuation, double spaces,  etc..
>
> Thinking somewhat subsersively as usual,
> where is the spec on what a data element should be named anyway?
> Perhaps users should be allowed to name their data elements anything
> they please?
>
> Double spaces and trailing spaces are pretty annoying though, so that
> one I think we should exclude. :)
>
>
>
>
> On Tue, Aug 3, 2010 at 2:14 PM, Jason Pickering
> <jason.p.pickering@xxxxxxxxx> wrote:
>> Yeah, it won't work like this. Not so familar with Unicode and
>> JavaScript, but it does not seem to be possible to do this.
>>
>> From http://www.regular-expressions.info/javascript.html
>>
>> No Unicode support, except for matching single characters with \uFFFF
>>
>> Does not really seem to be a good way around this, except for server
>> side validation, where the \w expression should be locale dependent.
>>
>> Looks like there have been some requests for this in JQuery,
>> http://forum.jquery.com/topic/unicode-regex-support, but no clear
>> information on whether it is available (does not look like it).
>>
>> This does look promising however..
>>
>> http://blog.stevenlevithan.com/archives/xregexp-unicode-plugin
>>
>> Perhaps server side validation is the best way to try to go in this case?
>>
>> Regards,
>> Jason
>>
>>
>> On Tue, Aug 3, 2010 at 1:34 PM, Hieu Duy Dang
>> <hieu.hispvietnam@xxxxxxxxx> wrote:
>>> Hi Jason,
>>>
>>> I also checked that before did change \w to \p{L} or p{Letter} too. But
>>> could not fix that because some thing is strange. Please help us.
>>>
>>> Thank u.
>>>
>>> On Tue, Aug 3, 2010 at 3:25 PM, jason.p.pickering <612866@xxxxxxxxxxxxxxxxxx
>>>> wrote:
>>>
>>>> The Javascript validator is not setup to handle non-ASCII characters..
>>>>
>>>> /^[\w-.,()\/%'\"\s]+$/i.test(value)  [ line 81, additional-methods.js]
>>>>
>>>> The validator is expecting ASCII only characters (. So something
>>>> like..\w)
>>>>
>>>> Số trường hợp bệnh tả
>>>>
>>>> needs to be converted first to something like..
>>>>
>>>> S\u1ed1 tr\u01b0\u1eddng h\u1ee3p b\u1ec7nh t\u1ea3
>>>>
>>>> which should be valid with a bit of tweaking to store and display the
>>>> escape sequence correctly.
>>>>
>>>> Another possibility would be to use the \p{L} syntax, which should
>>>> allow all Unicode letters.
>>>>
>>>> Regards,
>>>> Jason
>>>>
>>>>
>>>> On Tue, Aug 3, 2010 at 12:23 PM, Kim Anh Vo <catakim@xxxxxxxxx> wrote:
>>>> > Public bug reported:
>>>> >
>>>> > based on the latest DHIS2 source-code on Aug 3rd 2010
>>>> > It's impossible to name a dael, dael-group, dataset, ind... with Unicode
>>>> characters
>>>> > (currently can use/borrow TRANSLATE function of dael, dael-group,
>>>> dataset,... to name them in Unicode characters instead)
>>>> >
>>>> > ** Affects: dhis2
>>>> >     Importance: Undecided
>>>> >         Status: New
>>>> >
>>>> > --
>>>> > Can't name dael, dael-group, dataset, ind in Vietnamese characters
>>>> > https://bugs.launchpad.net/bugs/612866
>>>> > You received this bug notification because you are a member of DHIS 2
>>>> > India Developers, which is subscribed to DHIS.
>>>> >
>>>> > Status in DHIS 2 - District Health Information Software: New
>>>> >
>>>> > Bug description:
>>>> > based on the latest DHIS2 source-code on Aug 3rd 2010
>>>> > It's impossible to name a dael, dael-group, dataset, ind... with Unicode
>>>> characters
>>>> > (currently can use/borrow TRANSLATE function of dael, dael-group,
>>>> dataset,... to name them in Unicode characters instead)
>>>> >
>>>> >
>>>> >
>>>>
>>>>
>>>> --
>>>> Jason P. Pickering
>>>> email: jason.p.pickering@xxxxxxxxx
>>>> tel:+17069260025
>>>>
>>>> --
>>>> Can't name dael, dael-group, dataset, ind in Vietnamese characters
>>>> https://bugs.launchpad.net/bugs/612866
>>>> You received this bug notification because you are a member of DHIS 2
>>>> India Developers, which is subscribed to DHIS.
>>>>
>>>> Status in DHIS 2 - District Health Information Software: New
>>>>
>>>> Bug description:
>>>> based on the latest DHIS2 source-code on Aug 3rd 2010
>>>> It's impossible to name a dael, dael-group, dataset, ind... with Unicode
>>>> characters
>>>> (currently can use/borrow TRANSLATE function of dael, dael-group,
>>>> dataset,... to name them in Unicode characters instead)
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Hieu.HISPVietnam
>>> Good Health !
>>>
>>> --
>>> Can't name dael, dael-group, dataset, ind in Vietnamese characters
>>> https://bugs.launchpad.net/bugs/612866
>>> You received this bug notification because you are a member of DHIS 2
>>> India Developers, which is subscribed to DHIS.
>>>
>>> Status in DHIS 2 - District Health Information Software: New
>>>
>>> Bug description:
>>> based on the latest DHIS2 source-code on Aug 3rd 2010
>>> It's impossible to name a dael, dael-group, dataset, ind... with Unicode characters
>>> (currently can use/borrow TRANSLATE function of dael, dael-group, dataset,... to name them in Unicode characters instead)
>>>
>>>
>>>
>>
>>
>>
>> --
>> Jason P. Pickering
>> email: jason.p.pickering@xxxxxxxxx
>> tel:+17069260025
>>
>
>
>
> --
> Jason P. Pickering
> email: jason.p.pickering@xxxxxxxxx
> tel:+17069260025
>


-- 
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+17069260025

-- 
Can't name dael, dael-group, dataset, ind in Vietnamese characters
https://bugs.launchpad.net/bugs/612866
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.

Status in DHIS 2 - District Health Information Software: New

Bug description:
based on the latest DHIS2 source-code on Aug 3rd 2010
It's impossible to name a dael, dael-group, dataset, ind... with Unicode characters
(currently can use/borrow TRANSLATE function of dael, dael-group, dataset,... to name them in Unicode characters instead)





Follow ups

References