[Support Request] Hebrew charset converter


Good day everyone. I know It's been some time since I have spoken here.
I have been coding on the "other" similar project, which were a escape from the resource-eating drupal to the mobile realm. (The mobile modules didn't do the trick sadly).


There have been some progress. When it comes to bible content as well there. Much have been added to http://sourceforge.net/projects/scripture/files/Bible_Content


Now I am working on making a hebrew new testament UTF. And i wondered; would someone here have such function ready; or be interested in making one ASCII to utf8 converter in PHP?; I would happily provide the content file in ascii.


The mobile version have had some progress since last, take a look. http://scripture.sf.net / http://bibel.sf.net


Here is a example that requires conversion:
~h'r'b.a;-!B, dwID'-!B, [;WvyE x;yviM'h; tdol.AT rp,se hz<

I also learned that it might be encoded with bibleworks fonts; and i found a macro which didn't do the trick for me here. But perhaps some of you know some visual basic in this sense ? I don't understand much of this myself:


Sub ConvertBwHeb2Unicode(fromfont$, tofont$, doentirefile)


Dim o As Object


Dim ucstr As Variant


ReDim ucstr(1024) As Long


If (doentirefile = True) Then Selection.HomeKey Unit:=wdStory


Set o = CreateObject("bibleworks.automation")


Application.ScreenUpdating = True


icheck = 0


While (icheck = 0)




With Selection.Find


.Font.Name = fromfont$


.Text = ""


.Replacement.Text = ""


.Forward = True


.Wrap = wdFindStop


.Format = True


.MatchCase = False


.MatchWholeWord = False


.MatchKashida = False


.MatchDiacritics = False


.MatchAlefHamza = False


.MatchControl = False


.MatchByte = False


.CorrectHangulEndings = False


.MatchAllWordForms = False


.MatchSoundsLike = False


.MatchWildcards = False


.MatchFuzzy = False


End With


If (Selection.Find.Execute = False) Then


icheck = 1




istart = 1


iend = Selection.Characters.Count


ReDim ucstr(3 * iend + 2) As Long


ucstr(1) = iend


For i = istart To iend


ucstr(i + 1) = Asc(Selection.Characters(i))


Next i


o.BwHebb2Unicode ucstr


rem Selection.Delete


Application.Keyboard (1037)


With Selection.Font


.NameFarEast = "SimSun"


.NameAscii = "Arial"


.NameOther = "Arial"


.Name = "Arial"


.Size = 10


.Bold = False


.Italic = False


.Underline = wdUnderlineNone


.UnderlineColor = wdColorAutomatic


.StrikeThrough = False


.DoubleStrikeThrough = False


.Outline = False


.Emboss = False


.Shadow = False


.Hidden = False


.SmallCaps = False


.AllCaps = False


.Color = wdColorAutomatic


.Engrave = False


.Superscript = False


.Subscript = False


.Spacing = 0


.Scaling = 100


.Position = 0


.Kerning = 0


.Animation = wdAnimationNone


.DisableCharacterSpaceGrid = False


.EmphasisMark = wdEmphasisMarkNone


.SizeBi = 14


.NameBi = tofont$


.BoldBi = False


.ItalicBi = False


End With


For i = 1 To ucstr(1)


s$ = ChrW(ucstr(i + 1))


Selection.TypeText Text:=s$


Next i


Application.Keyboard (1033)


End If


If (doentirefile = False) Then icheck = 1




Application.ScreenUpdating = True


Set bwutil = Nothing


End Sub



Thank you.