Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Refined soundex doesn't tolerate non latin characters

  1. #1

    Default Refined soundex doesn't tolerate non latin characters

    Hello all,

    I have the issue with refined soundex algorithm which I am using from formula.
    It doesn't want to process the non-english characters, so I wrote the Java script that is checking the existance of non-latin characters. Can you advise me how to proceed to calculator now? How to tell to calculator to run soundex if First_name_c_sound = Boolean.FALSE etc

    var string1 = [First_name_c];
    var string2 = [Middle_name_c];
    var string3 = [Last_name_c];
    var string4 = [First_name_s];
    var string5 = [Middle_name_s];
    var string6 = [Last_name_s];

    var First_name_c_sound;
    var Middle_name_c_sound;
    var Last_name_c_sound;
    var First_name_s_sound;
    var Middle_name_s_sound;
    var Last_name_s_sound;

    First_name_c_sound = !/[a-zA-Z0-9"#$%&'()!*+-./:;<=>?@[\]^_`{|}~]/.test(string1);
    Middle_name_c_sound = !/[a-zA-Z0-9"#$%&'()!*+-./:;<=>?@[\]^_`{|}~]/.test(string2);
    Last_name_c_sound = !/[a-zA-Z0-9"#$%&'()!*+-./:;<=>?@[\]^_`{|}~]/.test(string3);
    First_name_s_sound = !/[a-zA-Z0-9"#$%&'()!*+-./:;<=>?@[\]^_`{|}~]/.test(string4);
    Middle_name_s_sound = !/[a-zA-Z0-9"#$%&'()!*+-./:;<=>?@[\]^_`{|}~]/.test(string5);
    Last_name_s_sound = !/[a-zA-Z0-9"#$%&'()!*+-./:;<=>?@[\]^_`{|}~]/.test(string6);

  2. #2


    In the meanwhile I found solution

    var rforeign = /[^\u0000-\u007f]/;

    if (rforeign.test(string1) || rforeign.test(string2) || rforeign.test(string3) || rforeign.test(string7) ) {
    result =false;
    } else {
    result =true;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.