Originally posted by Richard Hart
Richard Hart wrote:I didn't think there was a solution without using the complete character set, but my boss was keen to investigate the possibility for a mathmatical solution.
Richard Hart wrote:
#!/hci/qdx5.4.1/integrator/bin/hcitclpackage require base64proc convert { hex } { scan $hex "%x" dec set str "" while { $dec } { set str [format "%c" [expr $dec%256]]$str set dec [expr $dec/256] } return [::base64::encode $str]}puts [convert abc123]
Richard Hart wrote:David.Thanks for the suggestion, unfortunately the range is 0-9 and A-Z.
A base64 conversion works size wise, ie 6 characters to 5, but then gets into binary data which is non-standard and may have issues with HL7 message characters.