Re: [PATCH] linux: Allow valid UTF-8 encoded string.

2013-09-03 Thread Martin Pitt
Hello Shih-Yuan, Thanks for your patch! I created a new test case for vendor/product/serial strings in http://cgit.freedesktop.org/upower/commit/?id=d070b4b83 and then committed your patch with the according test case update: http://cgit.freedesktop.org/upower/commit/?id=ba363c8 Note that

Re: [PATCH v3] linux: Detect the battery of bluetooth input devices.

2013-09-03 Thread Martin Pitt
Hey Shih-Yuan, for the record, the Launchpad bugs have various upower --dump outputs which are relevant for this: http://pad.lv/1069075 attachment → https://bugs.launchpad.net/ubuntu/+source/indicator-power/+bug/1069075/+attachment/3405886/+files/UPowerDump.txt http://pad.pv/1086746 (inli

[PATCH] linux: Add UTF-8 encoding support.

2013-09-03 Thread Shih-Yuan Lee (FourDollars)
From: "Shih-Yuan Lee (FourDollars)" --- src/up-main.c |2 ++ tools/up-tool.c |2 ++ 2 files changed, 4 insertions(+) diff --git a/src/up-main.c b/src/up-main.c index a7e6eb6..6706053 100644 --- a/src/up-main.c +++ b/src/up-main.c @@ -32,6 +32,7 @@ #include #include #include +#in

Re: [PATCH] linux: Add UTF-8 encoding support.

2013-09-03 Thread Martin Pitt
Hello Shih-Yuan, Shih-Yuan Lee (FourDollars) [2013-09-03 17:44 +0800]: > + setlocale(LC_ALL, "en_US.utf8"); Can you please describe further what this patch should achieve? It's not at all guaranteed that this locale is available. Thanks, Martin -- Martin Pitt| http:

Re: [PATCH] linux: Add UTF-8 encoding support.

2013-09-03 Thread Shih-Yuan Lee (FourDollars)
Hi Martin, On Tue, Sep 3, 2013 at 5:52 PM, Martin Pitt wrote: > Hello Shih-Yuan, > > Shih-Yuan Lee (FourDollars) [2013-09-03 17:44 +0800]: >> + setlocale(LC_ALL, "en_US.utf8"); > > Can you please describe further what this patch should achieve? It's > not at all guaranteed that this locale is

Re: [PATCH] linux: Add UTF-8 encoding support.

2013-09-03 Thread Shih-Yuan Lee (FourDollars)
Hi, On Tue, Sep 3, 2013 at 6:00 PM, Shih-Yuan Lee (FourDollars) wrote: > Hi Martin, > > On Tue, Sep 3, 2013 at 5:52 PM, Martin Pitt wrote: >> Hello Shih-Yuan, >> >> Shih-Yuan Lee (FourDollars) [2013-09-03 17:44 +0800]: >>> + setlocale(LC_ALL, "en_US.utf8"); >> >> Can you please describe furt

Re: [PATCH] linux: Add UTF-8 encoding support.

2013-09-03 Thread Martin Pitt
Shih-Yuan Lee (FourDollars) [2013-09-03 18:04 +0800]: > > It is because when I run ‘/usr/lib/upower/upowerd -v` and `upower --dump`. Is upower --dump actually wrong? The way how upowerd reads attribute names should not depend on the locale that upowerd runs under; if it does, we need to fix that p

[PATCH v2] linux: Add locale support.

2013-09-03 Thread Shih-Yuan Lee (FourDollars)
From: "Shih-Yuan Lee (FourDollars)" --- src/up-main.c |2 ++ tools/up-tool.c |2 ++ 2 files changed, 4 insertions(+) diff --git a/src/up-main.c b/src/up-main.c index a7e6eb6..ba79685 100644 --- a/src/up-main.c +++ b/src/up-main.c @@ -32,6 +32,7 @@ #include #include #include +#in

[PATCH] hidpp: try harder not to report 0% battery

2013-09-03 Thread Peter Wu
(1) If the K800 keyboard is charging via the USB cable, it will report itself as Charging, but with a discharge level of 0 (which means "unknown". In this case, the previous known value (before connecting the cable) is always a better approximation than using zero. (2) When th

Re: [PATCH] hidpp: try harder not to report 0% battery

2013-09-03 Thread Martin Pitt
Hey Peter Wu, Peter Wu [2013-09-03 23:24 +0200]: > (1) If the K800 keyboard is charging via the USB cable, it will report > itself as Charging, but with a discharge level of 0 (which means > "unknown". In this case, the previous known value (before > connecting the cable) is always

Re: [PATCH v2] linux: Add locale support.

2013-09-03 Thread Martin Pitt
Hey Shih-Yuan, Thanks! I pushed your patch with a better commit message: http://cgit.freedesktop.org/upower/commit/?id=fdc62ad245e Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) __