It is currently Thu Sep 09, 2010 04:39
  • View your posts
  • FAQ
  • Register
  • Login

  • All times are UTC + 1 hour [ DST ]



    Post new topic Reply to topic  [ 5 posts ] 
    Author Message
     Post subject: Missing space characters! Build 484
    PostPosted: Tue Jan 05, 2010 01:55 
    Offline
     E-mail  Profile

    Joined: Tue Jan 05, 2010 01:37
    Posts: 2
    Version: 2.0.8 (Dominion) Build 484
    In the name of the corporation is missing whitespace characters.
    For example, my corporation "Order_ _of Maltese Knights" parser recognized as "Order_of Maltese Knights". In the API space characters present. Killboard because of this not working properly.

    http://www.o-m-k.ru/kb/

    Import from file - bug present
    API Mod - bug present
    When you request information on players or corporations to API, the data come correct, and this leads to the problem.


    Top
     
     Post subject: Re: Missing space characters! Build 484
    PostPosted: Tue Jan 19, 2010 09:44 
    Offline
     E-mail  Profile

    Joined: Fri Jan 01, 2010 19:37
    Posts: 6
    BlessKnight wrote:
    Version: 2.0.8 (Dominion) Build 484
    In the name of the corporation is missing whitespace characters.
    For example, my corporation "Order_ _of Maltese Knights" parser recognized as "Order_of Maltese Knights". In the API space characters present. Killboard because of this not working properly.

    http://www.o-m-k.ru/kb/

    Import from file - bug present
    API Mod - bug present
    When you request information on players or corporations to API, the data come correct, and this leads to the problem.



    its not only you who have that problem. Corporations with mutiple spaces ect "Economics of war" have the same issue. (economics++of+war)


    Top
     
     Post subject: Re: Missing space characters! Build 484
    PostPosted: Tue Jan 19, 2010 18:11 
    Offline
     E-mail  Profile

    Joined: Sat Jun 20, 2009 13:46
    Posts: 66
    It seems that double spaces are intentionally being stripped. To change the behaviour find this in common/includes/class.parser.php:

    Code:
            //trim out any multiple spaces that may exist
            $this->killmail_ = preg_replace('/ +/', ' ', $this->killmail_);


    and comment that line of code out like this:
    Code:
            //trim out any multiple spaces that may exist
            //$this->killmail_ = preg_replace('/ +/', ' ', $this->killmail_);

    However, the original code is likely there for a reason and someone more knowledgeable about the quirks of CCP's killmails will hopefully be along and tell you what may go wrong if double spaces are not stripped.

    Note that double spaces will still not display due to the way HTML works. Unless that is an issue I suggest to leave it as it is because while changing the way the corp name is returned in class.corp.php would fix that (by returning a non-breaking space   where necessary) without further investigation I would say that it risks to break other code relying on it.


    Top
     
     Post subject: Re: Missing space characters! Build 484
    PostPosted: Wed Jan 20, 2010 01:08 
    Offline
    GOD!
     Profile

    Joined: Wed Nov 26, 2008 13:35
    Posts: 1669
    Nice catch!

    I think that names with two spaces weren't valid in the past. They're barely valid now since Eve itself doesn't handle them half the time. They are accepted by Eve now, though. Just to make things harder, I have occasionally seen incorrect extra spaces in API output. I've never managed to repeat that so I don't know how it happened.

    For now I think leaving multiple spaces in names is the correct approach. FriedRoadKill is the master parser, though. :)


    Top
     
     Post subject: Re: Missing space characters! Build 484
    PostPosted: Mon Feb 01, 2010 17:36 
    Offline
     E-mail  Profile

    Joined: Tue Jan 05, 2010 01:37
    Posts: 2
    Thank you!
    Temporary use correction KM in the database.
    php i do not know, why this decision was for me easier.

    Code:
    update kb3_pilots set plt_crp_id=<real id> where plt_crp_id=<error id>;
    update kb3_kills set kll_crp_id=<real id> where kll_crp_id=<error id>;
    update kb3_inv_detail set ind_crp_id=<real id> where ind_crp_id=<error id>


    Top
     
    Display posts from previous:  Sort by  
    Post new topic Reply to topic  [ 5 posts ] 

    All times are UTC + 1 hour [ DST ]


    Who is online

    Users browsing this forum: No registered users and 1 guest


    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum

    Search for:
    Jump to:  
    Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group  
    Style Designed By phpBBegypt