CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1

    better string sorting?

    does anybody know how to make my language string sorting functional
    microsoft's version has some bugs
    when i debug it it goes from CString to kernel32.dll
    exists any API-hook?
    i looking for any system solution, not for my program only
    thanks for reply
    t!


  2. #2
    Join Date
    Jun 1999
    Location
    Indiana, USA
    Posts
    94

    Re: better string sorting?

    You could write your oun sorting function... Perhaps a quick sort or something. If you need instructions on how to go about doing this (or you'd like to see one) just say so.

    ///////////////////////////////////////////////////////
    Good things come to those who wait...
    But they come used by the impatient....
    ///////////////////////////////////////////////////////

  3. #3

    Re: better string sorting?

    sorry, it seems like misunderstanding, maybe i wrote it wrong way
    i'm looking for possiblility to hook system string-compare actual-language-depending function
    for my language (slovak) it works not properly
    call quickly ends in kernel32.dll and i do not see any possibility how to improve it (i know how to write functional comparing function(s) but how to add them to the system?)
    thanks for reply
    t!


  4. #4

    Re: better string sorting?

    noone knows?


  5. #5
    Guest

    Re: better string sorting?

    Write your own code . Only God can correct Microsoft's error ;-)



  6. #6

    Re: better string sorting?

    no problem write it but how to add into system?


  7. #7
    Join Date
    May 1999
    Posts
    318

    Re: better string sorting?

    What comparaison functions do you use ?
    Do you use the CString compare methods ?

    If yes then make your own class derived from CString and change the method you want to implement.

    Example :

    class CMyString : public CString {

    public:
    CMyString();

    // operators
    BOOL operator >=( const CString& s1, const CString& s2 );

    };




    The methods you implement in your class will be called in place of the methods of the CString.

    Hope this helps





  8. #8

    Re: better string sorting?

    easy but another softwares like excel etc will still not work correctly
    it is quite stupid for sorting export data to ascii, use my old good dos program and then import them back
    how to get into system?


  9. #9
    Join Date
    May 1999
    Posts
    318

    Re: better string sorting?

    The only method i know to compare strings is to compare integer value of each ascii byte.
    Therefore i dont think you can change the system to have ALL programs a good method to compare strings because each program use their own compare code (for example CString, strcmp, ...).

    Perhaps i am wrong but still think there isn't a system level solution.


  10. #10

    Re: better string sorting?

    you wrong
    this call ends in somewhere in kernel32, (where continues?) and is national setting dependent
    what is your language? for example in english is letter order aAbB etc i think but in ascii is ab...AB (AB...ab?)
    in my language are letters like á, ó etc. which are in ascii order long time after english letters (and some next details)


  11. #11
    Join Date
    Apr 1999
    Posts
    383

    Re: better string sorting?

    Have you looked at the Standard Template Library 'string' class and the 'collate' class in the <locale> header. Collate is a locale facet that can control comparisons of character sequences according to your locale settings.

    Dave


  12. #12

    Re: better string sorting?

    hi dave
    sorry but you lost last discussion
    no problem with wrong national settings but that for my national setting it doesn't work properly for whole situation and i looking for way correct it


  13. #13
    Join Date
    May 1999
    Location
    Paris France
    Posts
    30

    Re: better string sorting?

    I think the situation is hopeless. If you consider the fact that the source code of the offending modules is carefully hidden and the precedent of the Icelandic scandal (the Icelandic government proposed to pay Microsoft to write a version of Windows which supports the icelandic language).
    Your corporation/administration should set some buying guide lines, for example that an Operating System that does not follow a minimum set of standards (POSIX, ANSI, ... ) may not be purchased. The slovak government should also formally ask Microsoft about its position relative POSIX compliance.

    Regards.


  14. #14

    Re: better string sorting?

    maybe we going out of theme (how to get into (ms) system to correct bug) but what speaks posix about (my-languate) string comparation?


  15. #15
    Join Date
    Apr 1999
    Posts
    383

    Re: better string sorting?

    > for my national setting it doesn't work properly for whole situation

    I don't understand what you mean by this. Are you saying the system collation sequence for your country is wrong?

    Dave


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured