# Path: importerConstants.py
# ENCODING_FS      = 'utf8'


import os, sys, datetime, FreeCADGui, json, shutil, re
			import sys
from PySide.QtCore     import *
from PySide.QtGui      import *
from struct            import Struct, unpack_from, pack
from FreeCAD           import Vector as VEC, Console, ParamGet
from olefile           import OleFileIO
from importerConstants import ENCODING_FS

			The zero based offset of the UID.
	Returns:
		The UID at offset.
		The new position in the 'stream'.
	'''
	end = offset + 16
	val = UID(bytes_le=data[offset:end])
	return val, end

def getDateTime(data, offset):
	'''
	Returns a timestamp (datetime).
	Args:
		data
			A binary string.
		offset
			The zero based offset of the timestamp.
	Returns:
		The timestamp at offset.
		The new position in the 'stream'.
	'''
	val, = DATETIME(data, offset)
	if val != 0:
		return datetime.datetime(1601, 1, 1) + datetime.timedelta(microseconds=val/10.), offset + 8
	return None, offset + 8

def getText8(data, offset, l):
	i = offset
	end = i + l
	try:

# Path: importerConstants.py
# ENCODING_FS      = 'utf8'


# Path: importerUtils.py
import os, sys, datetime, FreeCADGui, json, shutil, re
			import sys
from PySide.QtCore     import *
from PySide.QtGui      import *
from struct            import Struct, unpack_from, pack
from FreeCAD           import Vector as VEC, Console, ParamGet
from olefile           import OleFileIO
from importerConstants import ENCODING_FS

			The zero based offset of the UID.
	Returns:
		The UID at offset.
		The new position in the 'stream'.
	'''
	end = offset + 16
	val = UID(bytes_le=data[offset:end])
	return val, end

def getDateTime(data, offset):
	'''
	Returns a timestamp (datetime).
	Args:
		data
			A binary string.
		offset
			The zero based offset of the timestamp.
	Returns:
		The timestamp at offset.
		The new position in the 'stream'.
	'''
	val, = DATETIME(data, offset)
	if val != 0:
		return datetime.datetime(1601, 1, 1) + datetime.timedelta(microseconds=val/10.), offset + 8
	return None, offset + 8

def getText8(data, offset, l):
	i = offset
	end = i + l
	try:

		txt = data[i: end].decode(ENCODING_FS)
