Skip to content

darshanman40/goicu

 
 

Repository files navigation

This work is mainly for embedding ICU57 into your Go application.

To use this lib, include the following in your Go lib which needs to use ICU:

// #cgo CPPFLAGS: -I${SRCDIR}/icu/icuembed -DU_DISABLE_RENAMING=1
// #cgo darwin LDFLAGS: -Wl,-undefined -Wl,dynamic_lookup
// #cgo !darwin LDFLAGS: -Wl,-unresolved-symbols=ignore-all -lrt
import "C"

import (
	"github.com/dgraph-io/goicu/icuembed"
)

And you will need to call this somewhere, e.g., init():

icuembed.Load(filename)

where filename above points to where your ICU data file is. It is included in this repo:

https://github.com/dgraph-io/goicu/blob/master/icudt57l.dat

We will add some tests soon. We do test it indirectly in github.com/dgraph-io/dgraph/tok.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 57.7%
  • C 42.2%
  • Other 0.1%