Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using home made fix procedures for non Latin characters Yoel Kortick.

Similar presentations


Presentation on theme: "Using home made fix procedures for non Latin characters Yoel Kortick."— Presentation transcript:

1 Using home made fix procedures for non Latin characters Yoel Kortick

2 2 Introduction This presentation will focus on using home made fix procedures for non Latin characters For information on using home made fix procedures in general see the following two files: 1.How_to_make_home_made_fix_procedures_examples_16+_yk.ppt 2.How_to_make_home_made_fix_procedures_parameters_16+_yk.ppt On the doc Portal under directory: Aleph > Tree Search > How to from support > Miscellaneous

3 3 Introduction In this presentation we will show how the non Latin scripts will be represented in the $data_tab/import fix procedure file We will show the step by step method of identifying the exact Decimal (DEC) value of the letters

4 4 Example 1 Let’s say we have this record And we want to change the Hebrew characters ספרנות in 650 4 field to “Library science”

5 5 Example 1 We will do this by using the REPLACE-STRING parameter in the $data_tab/import file ! 2 3 4 5 6 7 8 9 !-!!!!!-!!-!-!!!-!!!-!!!!!-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1 650## REPLACE-STRING original_string,new_desired_string Above we need to enter the original string and the new desired string The original string is ספרנות and the desired new string is Library science

6 6 The problem In the $data_tab/import file we can not (always) enter the actual non Latin characters. This is dependent on our vi, terminal emulator and server. However, we can enter the Decimal value. In order to know the Decimal value we do as follows.

7 7 Acquiring values for script part 1 Search the web OPAC for the word

8 8 Acquiring values for script part 2 See the value of the word either in the URL or in the web server log file

9 9 Acquiring values for script Part 3 Convert the values We need to convert this: %D7%A1%D7%A4%D7%A8%D7%A0%D7%95%D 7%AA Enter each value into calculator and then change from hexadecimal to decimal. We will do this now for the values above in red We will use A1 as an example

10 10 Acquiring values for script Part 3 The calculator is in scientific mode

11 11 Acquiring values for script Part 3 We enter A1 while in Hex mode

12 12 Acquiring values for script Part 3 Then click Dec and get the value for the script

13 13 Adjusting the script Each value should be entered in the script with a \ (slash) before it 1 650## REPLACE-STRING \215\161\215\164\215\168\215\160\215\149\215\170,Li brary science This is ספרנות from the string we saw in web server and in URL Here is the 161 from the previous slide

14 14 Example 2 Now we’ll do another example with text “ Softwarelösungen für bibliotheken” We will replace it with “Library automation solutions” We must get the values for the ö and ü above

15 15 Adjusting the script for example 2 We search for the text in the web OPAC and this is the relevant part of the URL: ?func=find-b&request= Softwarel%C3%B6sungen+f%C3%BCr+bibliotheken &find_code=WSU The ö and ü above are in red

16 16 Getting the values for example 2 Let’s begin with C3 It equals 195

17 17 Making script for example 2 Here is the line for “Softwarelösungen für bibliotheken” 2 650## REPLACE-STRING Softwarel\195\182sungen f\195\188r bibliotheken,Library automation solutions The is the ö This is the ü

18 18 The final script So now we have this: il-aleph02-18(1) USM01-YOELK>>tail -3 $data_tab/import/yoel_fix !-!!!!!-!!-!-!!!-!!!-!!!!!-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!! 1 650## REPLACE-STRING \215\161\215\164\215\168\215\160\215\149\215\170,Library science 2 650## REPLACE-STRING Softwarel\195\182sungen f\195\188r bibliotheken,Library automation solutions

19 19 The final script The script $data_tab/import/yoel_fix is activated in tab_fix as follows: il-aleph02-18(1) USM01-YOELK>>grep yoel_fix $data_tab/tab_fix YOELK fix_doc_do_file_08 yoel_fix This fix routine YOELK activates $data_tab/import/yoel_fix

20 20 Using the final script Record 62307 is in an input file in alephe_scratch il-aleph02-18(1) USM01-YOELK>>cat $alephe_scratch/a 000062307USM01 il-aleph02-18(1) USM01-YOELK>>

21 21 Using the final script The record is downloaded via manage_18 using the fix routine which uses our new script

22 22 Using the final script The desired changes have been made il-aleph02-18(1) USM01-YOELK>>cat $data_scratch/b 000062307 FMT L BK 000062307 LDR L 00000nam^a22^^^^^^u^4500 000062307 001 L 000062307 000062307 005 L 20090131201323.0 000062307 008 L 090130s2008^^^^cau^^^^^r^^^^^000^0^eng^d 000062307 1001 L $$aKortick, Yoel$$d1971- 000062307 24514 L $$aThe modern library. 000062307 260 L $$aEfrat :$$bYLK Publications,$$c2008. 000062307 650 4 L $$aLibrary science 000062307 650 4 L $$aLibrary automation solutions

23 23 Changing ’ to ' If we want to change ’ to ' then we can do a search in the web for a string which contains each of the characters In the web log file: we see this for ’: %E2%80%99 We see this for ': %27 If we change the above values to Decimal then we get this: Change \226\128\153 to \039 Note: %27 actually becomes \39, but we added the zero to make it three digits

24 24 Changing ’ to ' So now we have this record The apostrophe is Unicode value 2019

25 25 Changing ’ to ' Here is our fix procedure (called change_mark) yoelk@il-aleph07(a20_3) USM01> tail -2 $data_tab/import/change_mark !* change 2019 "RIGHT SINGLE QUOTATION MARK" to 0027 "APOSTROPHE" 1 245## REPLACE-STRING \226\128\153,\039 yoelk@il-aleph07(a20_3) USM01> Here it is in tab_fix yoelk@il-aleph07(a20_3) USM01> grep change_mark $data_tab/tab_fix QUOTE fix_doc_do_file_08 change_mark Here it is in fix_doc.eng yoelk@il-aleph07(a20_3) USM01> grep QUOTE $data_root/pc_tab/catalog/fix_doc.eng QUOTE N C Change 2019 "RIGHT SINGLE QUOTATION MARK" to 0027 "APOSTROPHE" yoelk@il-aleph07(a20_3) USM01>

26 26 Changing ’ to ' Now we run it

27 27 Changing ’ to ' Here is the change

28 Thank You! Yoel.Kortick@exlibrisgroup.com


Download ppt "Using home made fix procedures for non Latin characters Yoel Kortick."

Similar presentations


Ads by Google