Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Ghost folder
Klaus Schmidinger wrote:
>
> Hermann Gausterer wrote:
> >
> > On Saturday 04 October 2003 17:02, you wrote:
> > > The problem may be in the strxfrm() function used in cRecording::SortName()
> > > to allow locale specific sorting.
> > >
> > > Please repeat your test with the following modification (marked XXX):
> >
> > did it, and it works now as expected :-))
> >
> > [mrq1@mrqserv2 VDR]$ ./svdrpsend.pl LSTR | grep -i Ke
> > 250-13 01.10 15:12 Ke!~Dem
> > 250-14 02.10 15:17* Ke!~Det
> > 250-15 03.10 05:47* Ke!~Det
> > 250-17 26.09 23:32* Ke~Di
> > 250-18 29.09 23:32* Ke~Da
> > 250-19 30.09 23:32* Ke~Ei
> > 250-20 01.10 23:32* Ke~Sp1
> > 250-21 02.10 23:32* Ke~Sp2
> >
> > is there something else, i can do?
>
> Not really. This proves that strxfrm() causes this, and now
> we have to see how this can be fixed.
>
> Apparently strxfrm() doesn't distinguish special characters...
I guess I was a little premature with this conclusion.
Here's a little test program:
------------------------------------------------------
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <locale.h>
int main(void)
{
setlocale(LC_ALL, "");
const char *s = "aAbBcC äÄöÖüÜ sSß +-.,;:*!'|/";
char buf[1000];
const char *p = s;
while (*p) {
char b[10];
b[0] = *p;
b[1] = 0;
strxfrm(buf, b, sizeof(buf));
printf("%c ", *p);
char *q = buf;
while (*q) {
printf(" %02X", (unsigned char)*q);
q++;
}
p++;
printf("\n");
}
return 0;
}
------------------------------------------------------
If I do
export LC_COLLATE=de_DE
and then run it I get
a 0C 01 02 01 02
A 0C 01 02 01 04
b 0D 01 02 01 02
B 0D 01 02 01 04
c 0E 01 02 01 02
C 0E 01 02 01 04
01 01 01 01 11
ä 0C 01 0B 01 02
Ä 0C 01 0B 01 04
ö 1A 01 0B 01 02
Ö 1A 01 0B 01 04
ü 20 01 0B 01 02
Ü 20 01 0B 01 04
01 01 01 01 11
s 1E 01 02 01 02
S 1E 01 02 01 04
ß 1E 1E 01 04 04 01 02 02
01 01 01 01 11
+ 01 01 01 01 3A
- 01 01 01 01 15
. 01 01 01 01 1E
, 01 01 01 01 16
; 01 01 01 01 17
: 01 01 01 01 18
* 01 01 01 01 35
! 01 01 01 01 19
' 01 01 01 01 21
| 01 01 01 01 0D
/ 01 01 01 01 1D
which would indicate that strxfrm() _does_ distinguish between
the various special characters.
Maybe the problem is actually somewhere else.
@Hermann: can you please try again, with the original VDR code,
but this time replace the strcasecmp() call in cRecording::operator<()
with strcmp()? Does it still work as expected?
Klaus
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index