collation.go 388 B

1234567891011121314151617181920
  1. package cp
  2. // http://msdn.microsoft.com/en-us/library/dd340437.aspx
  3. type Collation struct {
  4. LcidAndFlags uint32
  5. SortId uint8
  6. }
  7. func (c Collation) getLcid() uint32 {
  8. return c.LcidAndFlags & 0x000fffff
  9. }
  10. func (c Collation) getFlags() uint32 {
  11. return (c.LcidAndFlags & 0x0ff00000) >> 20
  12. }
  13. func (c Collation) getVersion() uint32 {
  14. return (c.LcidAndFlags & 0xf0000000) >> 28
  15. }