Tuesday, August 30, 2011

[android-developers] Re: Disabling a set of 'reserved characters' from user Input?

Hmm... Daniel, that's for sure the best approach!

This one looks like nice option (using InputFilter):



On Aug 30, 12:07 pm, Daniel Drozdzewski <daniel.drozdzew...@gmail.com>
> On 30 August 2011 10:57, bdk <mathieu.b...@gmail.com> wrote:
> > Thanks Chris, that's for sure useful :)
> Mathieu,
> Instead of doing cat and mouse chase of all possible path separators,
> just define, what characters you allow in a reg-ex. This will be much
> easier, as the file names have quite limited number of allowed chars.
> It is true that System.getProperty("path.separator") or
> File.pathSeparator will store the path separator for current locale.
> But as you see, it will return only the separator for the current
> locale, while you need to filter them all (I think).
> In other words me defining the file path with Japanese Yen or Korean
> Won while in "en" locale and then quitting your app, changing locale
> to "jp" or "kr" and restarting your app could avoid your checks.
> --
> Daniel Drozdzewski

You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment